AES128ESP32 Library
Loading...
Searching...
No Matches
psaerr2str.h
Go to the documentation of this file.
1#pragma once
2// #include "delays.h"
3#include "AES128ESP32.h"
4
5
6#ifdef DEBUGLEVEL
7 #if DEBUGLEVEL > 1
8 #define FALSEORSTOP(status, function) \
9 DEBUG2(String(function) + " failed " + cryptoerrortoString(status)); \
10 STOP;
11 #else
12 #define FALSEORSTOP(s,f) return false;
13 #endif
14#else
15 #define FALSEORSTOP(s, f) return false;
16#endif
17
18#if DEBUGLEVEL > 2
19 // #warning debug level set
20 #define DUMP(t, b, l) cryptodump(t, b, l)
21#else
22 #define DUMP(t, b, l)
23#endif
24
25#define AES128_ERROR1 1000
26#define AES128_ERROR2 1001
27#define AES128_ERROR3 1002
28#define AES128_ERROR4 1003
29#define AES128_ERROR5 1004
30#define AES128_ERROR6 1005
31
32
33
34psa_status_t getLastAES128error();
35void cryptodump(String title, unsigned char *buf, int lenbuff);
36String cryptoerrortoString(psa_status_t err);
void cryptodump(String title, unsigned char *buf, int lenbuff)
String cryptoerrortoString(psa_status_t err)
psa_status_t getLastAES128error()
Definition psaerr2str.cpp:8