Hi,
As you know that there is a _hashcrypt example in SDK package for the LPC55S16, in the example, the hash value is from a array in RAM.
But I think the array can be located in flash directly, so it is unnecessary to copy from flash to RAM. You can compute hash value from a flash address with a size.
You can use the code like:
status_t status;
size_t outLength;
unsigned int length;
unsigned char output[32];
unsigned char *message;
length=0x1234;
outLength = sizeof(output);
memset(&output, 0, outLength);
message=(unsigned char *)0x12345678;
/************************ SHA-256 **************************/
status = HASHCRYPT_SHA(HASHCRYPT, kHASHCRYPT_Sha256, message, length, output, &outLength);
@brief Create HASH on given data
*
* Perform the full SHA in one function call. The function is blocking.
*
* @Param base HASHCRYPT peripheral base address
* @Param algo Underlaying algorithm to use for hash computation.
* @Param input Input data
* @Param inputSize Size of input data in bytes
* @Param[out] output Output hash data
* @Param[out] outputSize Output parameter storing the size of the output hash in bytes
* @return Status of the one call hash operation.
*/
status_t HASHCRYPT_SHA(HASHCRYPT_Type *base,
hashcrypt_algo_t algo,
const uint8_t *input,
size_t inputSize,
uint8_t *output,
size_t *outputSize);
Hope it can help you
BR
XiangJun Rong