aes.h 798 B

1234567891011121314151617181920212223242526272829
  1. /* Copyright (c) 2003, Roger Dingledine
  2. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  3. * Copyright (c) 2007-2012, The Tor Project, Inc. */
  4. /* See LICENSE for licensing information */
  5. /* Implements a minimal interface to counter-mode AES. */
  6. #ifndef _TOR_AES_H
  7. #define _TOR_AES_H
  8. /**
  9. * \file aes.h
  10. * \brief Headers for aes.c
  11. */
  12. struct aes_cnt_cipher;
  13. typedef struct aes_cnt_cipher aes_cnt_cipher_t;
  14. aes_cnt_cipher_t* aes_new_cipher(const char *key, const char *iv);
  15. void aes_cipher_free(aes_cnt_cipher_t *cipher);
  16. void aes_crypt(aes_cnt_cipher_t *cipher, const char *input, size_t len,
  17. char *output);
  18. void aes_crypt_inplace(aes_cnt_cipher_t *cipher, char *data, size_t len);
  19. int evaluate_evp_for_aes(int force_value);
  20. int evaluate_ctr_for_aes(void);
  21. #endif