tor  master
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-2017, 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 typedef struct aes_cnt_cipher aes_cnt_cipher_t;
17 
18 aes_cnt_cipher_t* aes_new_cipher(const uint8_t *key, const uint8_t *iv,
19  int key_bits);
21 #define aes_cipher_free(cipher) \
22  FREE_AND_NULL(aes_cnt_cipher_t, aes_cipher_free_, (cipher))
23 void aes_crypt_inplace(aes_cnt_cipher_t *cipher, char *data, size_t len);
24 
25 int evaluate_evp_for_aes(int force_value);
26 int evaluate_ctr_for_aes(void);
27 
28 #endif /* !defined(TOR_AES_H) */
29 
int evaluate_evp_for_aes(int force_value)
Definition: aes.c:199
int evaluate_ctr_for_aes(void)
Definition: aes.c:233
void aes_cipher_free_(aes_cnt_cipher_t *cipher)
Definition: aes.c:332
union aes_cnt_cipher::@1 key
aes_cnt_cipher_t * aes_new_cipher(const uint8_t *key, const uint8_t *iv, int key_bits)
Definition: aes.c:283
void aes_crypt_inplace(aes_cnt_cipher_t *cipher, char *data, size_t len)
Definition: aes.c:367
Definition: aes.c:156