1 // some functions borrowed from:
2 // Sven Peter <svenpeter@gmail.com>
3 // Segher Boessenkool <segher@kernel.crashing.org>
4 // Licensed under the terms of the GNU GPL, version 2
5 // http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
18 void fail(const char *a
, ...);
19 void *mmap_file(const char *path
);
21 void aes256cbc(u8
*key
, u8
*iv
, u8
*in
, u64 len
, u8
*out
);
22 void aes256cbc_enc(u8
*key
, u8
*iv
, u8
*in
, u64 len
, u8
*out
);
23 void aes128cbc(u8
*key
, u8
*iv_in
, u8
*in
, u64 len
, u8
*out
);
24 void aes128cbc_enc(u8
*key
, u8
*iv
, u8
*in
, u64 len
, u8
*out
);
25 void aesOmacMode1(u8
* output
, u8
* input
, int len
, u8
* aes_key_data
, int aes_key_bits
);
27 void sha1(u8
*data
, u32 len
, u8
*digest
);
29 void get_rand(u8
*bfr
, u32 size
);