MeterLogger
crypto.h
Go to the documentation of this file.
1 //
2 // crypto.h
3 // crypto_test
4 //
5 // Created by stoffer on 21/06/2016.
6 // Copyright © 2016 stoffer. All rights reserved.
7 //
8 
9 #ifndef crypto_h
10 #define crypto_h
11 
12 #include <esp8266.h>
13 #include <stdio.h>
14 
15 #define _align_32_bit __attribute__((aligned(4)))
16 
17 #define is_aligned(POINTER, BYTE_COUNT) \
18  (((uintptr_t)(const void *)(POINTER)) % (BYTE_COUNT) == 0)
19 
21 ICACHE_FLASH_ATTR size_t encrypt_aes_hmac_combined(uint8_t *dst, uint8_t *topic, size_t topic_l, uint8_t *message, size_t message_l);
22 ICACHE_FLASH_ATTR size_t decrypt_aes_hmac_combined(uint8_t *dst, uint8_t *topic, size_t topic_l, uint8_t *message, size_t message_l);
23 
24 #endif /* crypto_h */
ICACHE_FLASH_ATTR size_t decrypt_aes_hmac_combined(uint8_t *dst, uint8_t *topic, size_t topic_l, uint8_t *message, size_t message_l)
Definition: crypto.c:99
#define ICACHE_FLASH_ATTR
Definition: c_types.h:99
ICACHE_FLASH_ATTR size_t encrypt_aes_hmac_combined(uint8_t *dst, uint8_t *topic, size_t topic_l, uint8_t *message, size_t message_l)
Definition: crypto.c:68
static const char key[]
Definition: config.h:42
ICACHE_FLASH_ATTR void init_aes_hmac_combined(uint8_t *key)
Definition: crypto.c:22