tor  0.4.2.0-alpha-dev
aes.h
Go to the documentation of this file.
1 /* Copyright (c) 2003, Roger Dingledine
2  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
3  * Copyright (c) 2007-2019, The Tor Project, Inc. */
4 /* See LICENSE for licensing information */
5 
6 /* Implements a minimal interface to counter-mode AES. */
7 
8 #ifndef TOR_AES_H
9 #define TOR_AES_H
10 
16 #include "lib/cc/torint.h"
17 #include "lib/malloc/malloc.h"
18 
19 typedef struct aes_cnt_cipher aes_cnt_cipher_t;
20 
21 aes_cnt_cipher_t* aes_new_cipher(const uint8_t *key, const uint8_t *iv,
22  int key_bits);
23 void aes_cipher_free_(aes_cnt_cipher_t *cipher);
24 #define aes_cipher_free(cipher) \
25  FREE_AND_NULL(aes_cnt_cipher_t, aes_cipher_free_, (cipher))
26 void aes_crypt_inplace(aes_cnt_cipher_t *cipher, char *data, size_t len);
27 
28 int evaluate_evp_for_aes(int force_value);
29 int evaluate_ctr_for_aes(void);
30 
31 #endif /* !defined(TOR_AES_H) */
Integer definitions used throughout Tor.
Headers for util_malloc.c.