Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00034 #ifndef HAL_AES_H__
00035 #define HAL_AES_H__
00036 
00037 #include <stdint.h>
00038 #include <stdbool.h>
00039 
00043 #define _AES_ENABLE_GET_DEC_KEY_
00044 
00045 
00046 typedef enum
00047 {
00048   CBC,
00049   CFB,
00050   OFB,
00051   CTR,
00052   ECB,
00053 } aes_modes_t;
00054 
00108 void hal_aes_setup(bool decrypt_enable, aes_modes_t mode, const uint8_t *keyin, const uint8_t *ivin);
00121 void hal_aes_crypt(uint8_t *dest_buf, const uint8_t *src_buf);
00122 
00139 void hal_aes_get_dec_key(uint8_t *dest_dec_key, const uint8_t *src_enc_key);
00140 
00141 #endif  // AES_HAL_H__
00142