1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-23 07:58:09 +00:00
trezor-firmware/chacha20poly1305/ecrypt-types.h
Dusan Klinec bf1e1b13a6 chacha20poly1305: header polution reduction
- including chacah20poly1305.h polutes general namespace with macros defined in ecrypt-portable.h and ecrypt-machine.h which are needed only for .c files and should not leak to general namespace
- I've extracted types definition from ecrypt-portable.h to ecrypt-types.h as types are needed for interface definition in ecypt-sync.h which is needed in chacha20poly1305.h
2018-08-22 13:28:00 +02:00

54 lines
1.1 KiB
C

/* ecrypt-types.h */
/*
* *** Please do not edit this file. ***
*
* The default macros can be overridden for specific architectures by
* editing 'ecrypt-machine.h'.
*/
#ifndef ECRYPT_TYPES
#define ECRYPT_TYPES
#include "ecrypt-config.h"
/* ------------------------------------------------------------------------- */
/*
* The following types are defined (if available):
*
* u8: unsigned integer type, at least 8 bits
* u16: unsigned integer type, at least 16 bits
* u32: unsigned integer type, at least 32 bits
* u64: unsigned integer type, at least 64 bits
*
* s8, s16, s32, s64 -> signed counterparts of u8, u16, u32, u64
*
* The selection of minimum-width integer types is taken care of by
* 'ecrypt-config.h'. Note: to enable 64-bit types on 32-bit
* compilers, it might be necessary to switch from ISO C90 mode to ISO
* C99 mode (e.g., gcc -std=c99).
*/
#ifdef I8T
typedef signed I8T s8;
typedef unsigned I8T u8;
#endif
#ifdef I16T
typedef signed I16T s16;
typedef unsigned I16T u16;
#endif
#ifdef I32T
typedef signed I32T s32;
typedef unsigned I32T u32;
#endif
#ifdef I64T
typedef signed I64T s64;
typedef unsigned I64T u64;
#endif
#endif