debuggers.hg

view tools/blktap/drivers/aes.h @ 0:7d21f7218375

Exact replica of unstable on 051908 + README-this
author Mukesh Rathor
date Mon May 19 15:34:57 2008 -0700 (2008-05-19)
parents
children
line source
1 #ifndef QEMU_AES_H
2 #define QEMU_AES_H
4 #include <stdint.h>
6 #define AES_MAXNR 14
7 #define AES_BLOCK_SIZE 16
9 struct aes_key_st {
10 uint32_t rd_key[4 *(AES_MAXNR + 1)];
11 int rounds;
12 };
13 typedef struct aes_key_st AES_KEY;
15 int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
16 AES_KEY *key);
17 int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
18 AES_KEY *key);
20 void AES_encrypt(const unsigned char *in, unsigned char *out,
21 const AES_KEY *key);
22 void AES_decrypt(const unsigned char *in, unsigned char *out,
23 const AES_KEY *key);
24 void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
25 const unsigned long length, const AES_KEY *key,
26 unsigned char *ivec, const int enc);
28 #endif