/* Initialize the Hashcrypt engine for new operation. 
This function sets NEW and MODE fields in Hashcrypt Control register to start new operation. */
static void hashcrypt_engine_init(HASHCRYPT_Type *base, hashcrypt_algo_t algo)
/* Initialize the Hashcrypt engine for new operation. 
This function sets NEW and MODE fields in Hashcrypt Control register to start new operation. */
static void hashcrypt_engine_init(HASHCRYPT_Type *base, hashcrypt_algo_t algo)
{
    base->CTRL = HASHCRYPT_CTRL_NEW_HASH(1);
    base->CTRL = HASHCRYPT_CTRL_MODE(algo) | HASHCRYPT_CTRL_NEW_HASH(1);
}