AES Encryption Library for Arduino and Raspberry Pi
Spaniakos - AES Encryption Library for Arduino and Raspberry Pi
Main Page
Classes
Examples
AES_config.h
1
/* code was modified by george spanos <spaniakos@gmail.com>
2
* 16/12/14
3
*/
4
5
#ifndef __AES_CONFIG_H__
6
#define __AES_CONFIG_H__
7
8
#if (defined(__linux) || defined(linux)) && !defined(__ARDUINO_X86__)
9
10
#define AES_LINUX
11
12
#include <stdint.h>
13
#include <stdio.h>
14
#include <stdlib.h>
15
#include <string.h>
16
#include <sys/time.h>
17
#include <unistd.h>
18
#else
19
#include <Arduino.h>
20
#endif
21
22
#include <stdint.h>
23
#include <string.h>
24
25
#if defined(__ARDUINO_X86__) || (defined (__linux) || defined (linux))
26
#undef PROGMEM
27
#define PROGMEM __attribute__(( section(".progmem.data") ))
28
#define pgm_read_byte(p) (*(p))
29
typedef
unsigned
char
byte;
30
#define printf_P printf
31
#define PSTR(x) (x)
32
#else
33
#include <avr/pgmspace.h>
34
#endif
35
36
#define N_ROW 4
37
#define N_COL 4
38
#define N_BLOCK (N_ROW * N_COL)
39
#define N_MAX_ROUNDS 14
40
#define KEY_SCHEDULE_BYTES ((N_MAX_ROUNDS + 1) * N_BLOCK)
41
#define SUCCESS (0)
42
#define FAILURE (-1)
43
44
#endif
Generated on Tue Feb 10 2015 15:27:46 for AES Encryption Library for Arduino and Raspberry Pi by
1.8.9.1