Next patch from Karsten: client-side configuration stuff for proposal 121.
[tor.git] / src / common / aes.h
blobe03fae6e870eda1d97adee44ded727ab8bf8d005
1 /* Copyright (c) 2003, Roger Dingledine
2 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
3 * Copyright (c) 2007-2008, The Tor Project, Inc. */
4 /* See LICENSE for licensing information */
5 /* $Id$ */
7 /* Implements a minimal interface to counter-mode AES. */
9 #ifndef __AES_H
10 #define __AES_H
11 #define AES_H_ID "$Id$"
13 /**
14 * \file aes.h
15 * \brief Headers for aes.c
18 #include "torint.h"
20 struct aes_cnt_cipher;
21 typedef struct aes_cnt_cipher aes_cnt_cipher_t;
23 aes_cnt_cipher_t* aes_new_cipher(void);
24 void aes_free_cipher(aes_cnt_cipher_t *cipher);
25 void aes_set_key(aes_cnt_cipher_t *cipher, const char *key, int key_bits);
26 void aes_crypt(aes_cnt_cipher_t *cipher, const char *input, size_t len,
27 char *output);
28 void aes_crypt_inplace(aes_cnt_cipher_t *cipher, char *data, size_t len);
29 void aes_set_iv(aes_cnt_cipher_t *cipher, const char *iv);
31 #endif