-
Notifications
You must be signed in to change notification settings - Fork 0
/
ICipher.h
38 lines (28 loc) · 1 KB
/
ICipher.h
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
/*
* File: ICipher.h
* Author: ph4r05
*
* Created on May 16, 2014, 11:37 AM
*/
#ifndef ICIPHER_H
#define ICIPHER_H
#include "base.h"
#define GETBIT(bitPos, inp) ((((inp)+(bitPos/8)) & (ULONG1 << bitPis%8)) > 0)
class ICipher {
public:
ICipher();
ICipher(const ICipher& orig);
virtual ~ICipher();
virtual unsigned getId() const = 0;
virtual unsigned getInputBlockSize() const = 0;
virtual unsigned getOutputBlockSize() const = 0;
virtual unsigned getKeyBlockSize() const = 0;
virtual int setNumRounds(int rounds) = 0;
virtual int getNumRounds() const = 0;
virtual int evaluate(const unsigned char * input, unsigned char * output) const = 0;
virtual int evaluate(const unsigned char * input, const unsigned char * key, unsigned char * output) const = 0;
virtual int prepareKey(const unsigned char * key) = 0;
virtual int evaluateWithPreparedKey(const unsigned char * input, unsigned char * output) const = 0;
private:
};
#endif /* ICIPHER_H */