Back to index

tor  0.2.3.19-rc
aes.h
Go to the documentation of this file.
00001 /* Copyright (c) 2003, Roger Dingledine
00002  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
00003  * Copyright (c) 2007-2012, The Tor Project, Inc. */
00004 /* See LICENSE for licensing information */
00005 
00006 /* Implements a minimal interface to counter-mode AES. */
00007 
00008 #ifndef _TOR_AES_H
00009 #define _TOR_AES_H
00010 
00016 struct aes_cnt_cipher;
00017 typedef struct aes_cnt_cipher aes_cnt_cipher_t;
00018 
00019 aes_cnt_cipher_t* aes_new_cipher(const char *key, const char *iv);
00020 void aes_cipher_free(aes_cnt_cipher_t *cipher);
00021 void aes_crypt(aes_cnt_cipher_t *cipher, const char *input, size_t len,
00022                char *output);
00023 void aes_crypt_inplace(aes_cnt_cipher_t *cipher, char *data, size_t len);
00024 
00025 int evaluate_evp_for_aes(int force_value);
00026 int evaluate_ctr_for_aes(void);
00027 
00028 #endif
00029