Use uintX_t for the SE & copy bugfixed SE struct definition
This commit is contained in:
@@ -541,11 +541,11 @@ void se_calculate_sha256(void *dst, const void *src, size_t src_size) {
|
||||
/* Setup config for SHA256, size = BITS(src_size) */
|
||||
SECURITY_ENGINE->CONFIG_REG = (ENCMODE_SHA256 | ALG_SHA | DST_HASHREG);
|
||||
SECURITY_ENGINE->SHA_CONFIG_REG = 1;
|
||||
SECURITY_ENGINE->SHA_MSG_LENGTH_REG = (unsigned int)(src_size << 3);
|
||||
SECURITY_ENGINE->SHA_MSG_LENGTH_REG = (uint32_t)(src_size << 3);
|
||||
SECURITY_ENGINE->_0x20C = 0;
|
||||
SECURITY_ENGINE->_0x210 = 0;
|
||||
SECURITY_ENGINE->SHA_MSG_LEFT_REG = 0;
|
||||
SECURITY_ENGINE->_0x218 = (unsigned int)(src_size << 3);
|
||||
SECURITY_ENGINE->_0x218 = (uint32_t)(src_size << 3);
|
||||
SECURITY_ENGINE->_0x21C = 0;
|
||||
SECURITY_ENGINE->_0x220 = 0;
|
||||
SECURITY_ENGINE->_0x224 = 0;
|
||||
@@ -597,4 +597,4 @@ void se_generate_random(unsigned int keyslot, void *dst, size_t size) {
|
||||
se_perform_aes_block_operation(dst + aligned_size, size - aligned_size, NULL, 0);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user