/* Specifies HASH mode: SHA256 mode or HMAC mode.  */
int32_t HASH_SetMode(uint32_t u32HashMode)
/* Specifies HASH mode: SHA256 mode or HMAC mode.  */
int32_t HASH_SetMode(uint32_t u32HashMode)
{
    int32_t i32Ret;
    DDL_ASSERT(IS_HASH_MD(u32HashMode));
    i32Ret = HASH_Wait(HASH_ACTION_START);
    if (i32Ret == LL_OK) {
        MODIFY_REG32(CM_HASH->CR, HASH_CR_MODE, u32HashMode);
    }
    return i32Ret;
}