/* Loads data to Hashcrypt engine INDATA register. 
This function writes desired number of bytes starting from the src address to the dst address. Dst address does not increment (destination is peripheral module register INDATA). Src address increments to load consecutive words. */
__STATIC_INLINE void hashcrypt_load_data(HASHCRYPT_Type *base, uint32_t *src, size_t size)
/* Loads data to Hashcrypt engine INDATA register. 
This function writes desired number of bytes starting from the src address to the dst address. Dst address does not increment (destination is peripheral module register INDATA). Src address increments to load consecutive words. */
__STATIC_INLINE void hashcrypt_load_data(HASHCRYPT_Type *base, uint32_t *src, size_t size)
{
    uint32_t __attribute__((aligned(4))) inAlign[HASHCRYPT_AES_BLOCK_SIZE / sizeof(uint32_t)];
    uint32_t *in;
    uint8_t i;
    in = src;
    if ((0U != ((uint32_t)in & 3U)))
    {
        for (i = 0; i < ((uint32_t)size / 4U); i++)
        {
            inAlign[i] = hashcrypt_get_word_from_unaligned((uint8_t *)&src[i]);
        }
        in = &inAlign[0];
    }
    if (size >= sizeof(uint32_t))
    {
        base->INDATA = in[0];
        size -= sizeof(uint32_t);
    }
    for (uint32_t j = 0; j < size / 4U; j++)
    {
        base->ALIAS[j] = in[j + 1U];
    }
}