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

Go to the source code of this file.

Functions

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

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.