MAX32665 SDK Documentation  0.2
Software Development Kit Overview and API Documentation

Enumerations

enum  tpu_hashfunsel_t {
  TPU_HASH_DIS = MXC_V_TPU_HASH_CTRL_HASH_DIS,
  TPU_HASH_SHA1 = MXC_V_TPU_HASH_CTRL_HASH_SHA1,
  TPU_HASH_SHA224 = MXC_V_TPU_HASH_CTRL_HASH_SHA224,
  TPU_HASH_SHA256 = MXC_V_TPU_HASH_CTRL_HASH_SHA256,
  TPU_HASH_SHA384 = MXC_V_TPU_HASH_CTRL_HASH_SHA384,
  TPU_HASH_SHA512 = MXC_V_TPU_HASH_CTRL_HASH_SHA512
}
 Enumeration type for Hash function Select.
 

Functions

void TPU_Hash_Reset (void)
 Reset the crypto accelerator.
 
void TPU_Hash_Shutdown (void)
 Shutdown crypto controller.
 
int TPU_Hash_Config (tpu_hashfunsel_t func)
 Configure crypto hash operation for different hash functions. More...
 
int TPU_SHA (const char *msg, tpu_hashfunsel_t fun, unsigned int byteLen, char *digest)
 Test the SHA process. More...
 

Detailed Description

Function Documentation

◆ TPU_Hash_Config()

int TPU_Hash_Config ( tpu_hashfunsel_t  func)
Parameters
funcSelects the hash function
Returns
E_SUCCESS Hash algorithm configured successfully

◆ TPU_SHA()

int TPU_SHA ( const char *  msg,
tpu_hashfunsel_t  fun,
unsigned int  byteLen,
char *  digest 
)
Parameters
funSelects the hash function
msgPointer to source message
byteLenSpecifies size of message in bytes
digestDigest buffer
Returns
E_NULL_PTR Specified pointers msg; digest points to null
E_SUCCESS SHA process completed successfully