2007-12-12 21:09:01 +00:00
|
|
|
/* Copyright (c) 2003, Roger Dingledine
|
|
|
|
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
|
2011-01-03 11:50:39 -05:00
|
|
|
* Copyright (c) 2007-2011, 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. */
|
|
|
|
|
2008-12-29 02:21:02 +00: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
|
|
|
|
*/
|
|
|
|
|
2007-08-08 05:50:31 +00:00
|
|
|
#include "torint.h"
|
2003-06-30 19:18:12 +00:00
|
|
|
|
|
|
|
struct aes_cnt_cipher;
|
|
|
|
typedef struct aes_cnt_cipher aes_cnt_cipher_t;
|
|
|
|
|
2004-10-27 18:16:37 +00:00
|
|
|
aes_cnt_cipher_t* aes_new_cipher(void);
|
2003-06-30 19:18:12 +00:00
|
|
|
void aes_free_cipher(aes_cnt_cipher_t *cipher);
|
2005-05-07 05:55:06 +00:00
|
|
|
void aes_set_key(aes_cnt_cipher_t *cipher, const char *key, int key_bits);
|
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);
|
2007-09-19 15:53:38 +00:00
|
|
|
void aes_set_iv(aes_cnt_cipher_t *cipher, const char *iv);
|
2003-06-30 19:18:12 +00:00
|
|
|
|
|
|
|
#endif
|
2005-06-09 19:03:31 +00:00
|
|
|
|