File: DataProcessing.h

package info (click to toggle)
hashrat 1.8.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,700 kB
  • ctags: 1,677
  • sloc: ansic: 17,713; sh: 323; makefile: 157
file content (64 lines) | stat: -rw-r--r-- 1,784 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef LIBUSEFUL_DATA_PROCESSING_H
#define LIBUSEFUL_DATA_PROCESSING_H

#include "includes.h"



#ifdef __cplusplus
extern "C" {
#endif


typedef struct t_dpmod TProcessingModule;

typedef int (*DATA_PROCESS_INIT_FUNC)(TProcessingModule *Mod, const char *Args);
typedef int (*DATA_PROCESS_RW_FUNC)(TProcessingModule *, const char *Data, int len, char **OutBuff, int *OutBuffLen, int Flush);
typedef int (*DATA_PROCESS_CLOSE_FUNC)(TProcessingModule *Mod);

#define DPM_READ_FINAL 1
#define DPM_WRITE_FINAL 2
#define DPM_NOPAD_DATA 4

struct t_dpmod
{
char *Name;
char *Args;
int Flags;
char *ReadBuff, *WriteBuff;
int ReadSize, WriteSize;
int ReadUsed, WriteUsed;
int ReadMax, WriteMax;
ListNode *Values;
DATA_PROCESS_INIT_FUNC Init;
DATA_PROCESS_RW_FUNC Read;
DATA_PROCESS_RW_FUNC Write;
DATA_PROCESS_CLOSE_FUNC Close;
void *Data;
};


TProcessingModule *StandardDataProcessorCreate(const char *Class, const char *Name, const char *Arg);
int DataProcessorInit(TProcessingModule *ProcMod, const char *Key, const char *InputVector);
void DataProcessorDestroy(void *ProcMod);
char *DataProcessorGetValue(TProcessingModule *M, const char *Name);
void DataProcessorSetValue(TProcessingModule *M, const char *Name, const char *Value);


void InitialiseEncryptionComponents(const char *Args, char **CipherName, char **InputVector, int *InputVectorLen, char **Key, int *KeyLen, int *Flags);


int STREAMAddDataProcessor(STREAM *S, TProcessingModule *Mod, const char *Args);
int DataProcessorAvailable(const char *Class, const char *Name);
int STREAMAddStandardDataProcessor(STREAM *S, const char *Class, const char *Name, const char *Args);
void STREAMClearDataProcessors(STREAM *S);
int STREAMDeleteDataProcessor(STREAM *S, char *Class, char *Name);


#ifdef __cplusplus
}
#endif



#endif