![]() |
nrfxlib API 3.3.99
|
| int nrf_cc3xx_platform_sha256_hash | ( | void * | ram_buffer, |
| size_t | ram_buffer_size, | ||
| void * | data, | ||
| size_t | len, | ||
| void * | out ) |
#include <crypto/nrf_cc310_platform/include/nrf_cc3xx_platform_sha256.h>
Calculates SHA-256.
The function will utilize the CryptoCell hardware to hash data from RAM or flash. On CC310 a RAM buffer must be provided to support hashing of data that resides in flash. If it is guaranteed that the hashing input resides in RAM or the implementation supports DMA from Flash, NULL and a size of 0 can be provided.
ram_buffer must be word-aligned. The ram_buffer_size should be a multiple of the word size between 16 and 35520 bytes.| [in,out] | ram_buffer | Pointer to a RAM buffer used to hash from flash. |
| [in] | ram_buffer_size | The RAM buffer size in bytes. |
| [in] | data | Input data to be hashed. |
| [in] | len | Length of input data in bytes. |
| [out] | out | Pointer to 32-byte buffer where hash digest will be written. |