Tweak the bugfix for 2183 a bit more.
[tor/rransom.git] / src / common / aes.h
blob4fb735cfe5548c9729490bdeb5e0de3611e3c953
1 /* Copyright (c) 2003, Roger Dingledine
2 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
3 * Copyright (c) 2007-2010, The Tor Project, Inc. */
4 /* See LICENSE for licensing information */
6 /* Implements a minimal interface to counter-mode AES. */
8 #ifndef _TOR_AES_H
9 #define _TOR_AES_H
11 /**
12 * \file aes.h
13 * \brief Headers for aes.c
16 #include "torint.h"
18 struct aes_cnt_cipher;
19 typedef struct aes_cnt_cipher aes_cnt_cipher_t;
21 aes_cnt_cipher_t* aes_new_cipher(void);
22 void aes_free_cipher(aes_cnt_cipher_t *cipher);
23 void aes_set_key(aes_cnt_cipher_t *cipher, const char *key, int key_bits);
24 void aes_crypt(aes_cnt_cipher_t *cipher, const char *input, size_t len,
25 char *output);
26 void aes_crypt_inplace(aes_cnt_cipher_t *cipher, char *data, size_t len);
27 void aes_set_iv(aes_cnt_cipher_t *cipher, const char *iv);
29 #endif