2007-12-12 21:09:01 +00:00
|
|
|
/* Copyright (c) 2003, Roger Dingledine
|
|
|
|
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
|
2012-06-04 20:58:17 -04:00
|
|
|
* Copyright (c) 2007-2012, The Tor Project, Inc. */
|
2003-06-30 19:18:12 +00:00
|
|
|
/* See LICENSE for licensing information */
|
|
|
|
|
|
|
|
/* Implements a minimal interface to counter-mode AES. */
|
|
|
|
|
2012-10-12 12:13:10 -04:00
|
|
|
#ifndef TOR_AES_H
|
|
|
|
#define TOR_AES_H
|
2003-06-30 19:18:12 +00:00
|
|
|
|
2004-05-10 07:54:13 +00:00
|
|
|
/**
|
|
|
|
* \file aes.h
|
|
|
|
* \brief Headers for aes.c
|
|
|
|
*/
|
|
|
|
|
2003-06-30 19:18:12 +00:00
|
|
|
struct aes_cnt_cipher;
|
|
|
|
typedef struct aes_cnt_cipher aes_cnt_cipher_t;
|
|
|
|
|
2012-03-20 15:35:43 -04:00
|
|
|
aes_cnt_cipher_t* aes_new_cipher(const char *key, const char *iv);
|
2012-01-18 15:53:30 -05:00
|
|
|
void aes_cipher_free(aes_cnt_cipher_t *cipher);
|
2005-12-14 20:40:40 +00:00
|
|
|
void aes_crypt(aes_cnt_cipher_t *cipher, const char *input, size_t len,
|
|
|
|
char *output);
|
2008-02-07 16:10:33 +00:00
|
|
|
void aes_crypt_inplace(aes_cnt_cipher_t *cipher, char *data, size_t len);
|
2003-06-30 19:18:12 +00:00
|
|
|
|
2011-11-20 21:20:31 -05:00
|
|
|
int evaluate_evp_for_aes(int force_value);
|
2012-01-09 17:40:11 -05:00
|
|
|
int evaluate_ctr_for_aes(void);
|
2011-11-20 21:20:31 -05:00
|
|
|
|
2003-06-30 19:18:12 +00:00
|
|
|
#endif
|
2005-06-09 19:03:31 +00:00
|
|
|
|