/* Initialize the SHA engine for new hash. 
This function sets kDCP_CONTROL0_HASH_INIT for control0 in work packet to start a new hash. */
static status_t dcp_hash_engine_init(DCP_Type *base, dcp_hash_ctx_internal_t *ctxInternal)
/* Initialize the SHA engine for new hash. 
This function sets kDCP_CONTROL0_HASH_INIT for control0 in work packet to start a new hash. */
static status_t dcp_hash_engine_init(DCP_Type *base, dcp_hash_ctx_internal_t *ctxInternal)
{
    status_t status;
    status = kStatus_InvalidArgument;
    if ((kDCP_Sha256 == ctxInternal->algo) || (kDCP_Sha1 == ctxInternal->algo) || (kDCP_Crc32 == ctxInternal->algo))
    {
        ctxInternal->ctrl0 = kDCP_CONTROL0_HASH_INIT;
        status             = kStatus_Success;
    }
    return status;
}