AES128ESP32 Library
Loading...
Searching...
No Matches
psaerr2str.h File Reference
#include "AES128ESP32.h"

Go to the source code of this file.

Macros

#define FALSEORSTOP(s, f)
#define DUMP(t, b, l)
#define AES128_ERROR1   1000
#define AES128_ERROR2   1001
#define AES128_ERROR3   1002
#define AES128_ERROR4   1003
#define AES128_ERROR5   1004
#define AES128_ERROR6   1005

Functions

psa_status_t getLastAES128error ()
void cryptodump (String title, unsigned char *buf, int lenbuff)
String cryptoerrortoString (psa_status_t err)

Macro Definition Documentation

◆ AES128_ERROR1

#define AES128_ERROR1   1000

Definition at line 25 of file psaerr2str.h.

◆ AES128_ERROR2

#define AES128_ERROR2   1001

Definition at line 26 of file psaerr2str.h.

◆ AES128_ERROR3

#define AES128_ERROR3   1002

Definition at line 27 of file psaerr2str.h.

◆ AES128_ERROR4

#define AES128_ERROR4   1003

Definition at line 28 of file psaerr2str.h.

◆ AES128_ERROR5

#define AES128_ERROR5   1004

Definition at line 29 of file psaerr2str.h.

◆ AES128_ERROR6

#define AES128_ERROR6   1005

Definition at line 30 of file psaerr2str.h.

◆ DUMP

#define DUMP ( t,
b,
l )

Definition at line 22 of file psaerr2str.h.

◆ FALSEORSTOP

#define FALSEORSTOP ( s,
f )
Value:
return false;

Definition at line 15 of file psaerr2str.h.

Function Documentation

◆ cryptodump()

void cryptodump ( String title,
unsigned char * buf,
int lenbuff )

convert the binary data into hex - output to the serial port, which could be a problem. expected to be used for debugging only.

Definition at line 15 of file psaerr2str.cpp.

◆ cryptoerrortoString()

String cryptoerrortoString ( psa_status_t err)

convert an error code into a string. the error code is stored in _psa_last_error so it can be recovered with getLastAES128error().

information about psa can be found here : https://arm-software.github.io/psa-api/crypto/1.2/overview/intro.html

known errors: (unknown errors are not converted to an human readable error string) PSA_SUCCESS PSA_ERROR_INSUFFICIENT_MEMORY PSA_ERROR_INSUFFICIENT_STORAGE PSA_ERROR_COMMUNICATION_FAILURE PSA_ERROR_HARDWARE_FAILURE PSA_ERROR_CORRUPTION_DETECTED PSA_ERROR_INSUFFICIENT_ENTROPY PSA_ERROR_STORAGE_FAILURE PSA_ERROR_DATA_INVALID PSA_ERROR_DATA_CORRUPT PSA_ERROR_BUFFER_TOO_SMALL PSA_ERROR_INVALID_ARGUMENT PSA_ERROR_BAD_STATE PSA_ERROR_INVALID_SIGNATURE PSA_ERROR_NOT_SUPPORTED PSA_ERROR_INVALID_HANDLE PSA_ERROR_INSUFFICIENT_DATA PSA_ERROR_NOT_PERMITTED AES128_ERROR1 bytes invalid size. AES128_ERROR2 newkeyid is not valid. AES128_ERROR3 masterkeyid is not valid. AES128_ERROR4 masterkey invalid size. AES128_ERROR5 masterkey has already been created. AES128_ERROR6 masterkey has not been set.

Definition at line 71 of file psaerr2str.cpp.

◆ getLastAES128error()

psa_status_t getLastAES128error ( )

return the last error code

Definition at line 8 of file psaerr2str.cpp.