File: encrypt_stream.h

package info (click to toggle)
entropybroker 2.9-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,600 kB
  • sloc: cpp: 14,386; sh: 934; makefile: 188; java: 148; perl: 12
file content (18 lines) | stat: -rw-r--r-- 502 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class encrypt_stream
{
public:
	encrypt_stream();
	virtual ~encrypt_stream();

	static encrypt_stream * select_cipher(std::string type);

	virtual int get_ivec_size() = 0;
	virtual int get_key_size() = 0;

	virtual bool init(unsigned char *key, int key_len, unsigned char *ivec, bool force=false) = 0;

	virtual std::string get_name() = 0;

	virtual void encrypt(unsigned char *p_in, int len, unsigned char *p_out) = 0;
	virtual void decrypt(unsigned char *p_in, int len, unsigned char *p_out) = 0;
};