… | |
… | |
17 | Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ |
18 | */ |
19 | |
19 | |
20 | #include "config.h" |
20 | #include "config.h" |
21 | |
21 | |
22 | extern "C" { |
|
|
23 | # include "lzf/lzf.h" |
|
|
24 | } |
|
|
25 | |
|
|
26 | #include <cassert> |
22 | #include <cassert> |
27 | |
23 | |
28 | #include <list> |
24 | #include <list> |
29 | |
25 | |
30 | #include <openssl/rand.h> |
26 | #include <openssl/rand.h> |
… | |
… | |
45 | #if !HAVE_RAND_PSEUDO_BYTES |
41 | #if !HAVE_RAND_PSEUDO_BYTES |
46 | # define RAND_pseudo_bytes RAND_bytes |
42 | # define RAND_pseudo_bytes RAND_bytes |
47 | #endif |
43 | #endif |
48 | |
44 | |
49 | #define MAGIC "vped\xbd\xc6\xdb\x82" // 8 bytes of magic |
45 | #define MAGIC "vped\xbd\xc6\xdb\x82" // 8 bytes of magic |
|
|
46 | |
|
|
47 | #define ULTRA_FAST 1 |
|
|
48 | #define HLOG 15 |
|
|
49 | #include "lzf/lzf.h" |
|
|
50 | #include "lzf/lzf_c.c" |
|
|
51 | #include "lzf/lzf_d.c" |
50 | |
52 | |
51 | struct crypto_ctx |
53 | struct crypto_ctx |
52 | { |
54 | { |
53 | EVP_CIPHER_CTX cctx; |
55 | EVP_CIPHER_CTX cctx; |
54 | HMAC_CTX hctx; |
56 | HMAC_CTX hctx; |