/* param base DCP peripheral base address param handle Specifies the DCP channel used for hashing. param ctx Output hash context param algo Underlaying algorithm to use for hash computation. return Status of initialization  */
status_t DCP_HASH_Init(DCP_Type *base, dcp_handle_t *handle, dcp_hash_ctx_t *ctx, dcp_hash_algo_t algo)
/* param base DCP peripheral base address param handle Specifies the DCP channel used for hashing. param ctx Output hash context param algo Underlaying algorithm to use for hash computation. return Status of initialization  */
status_t DCP_HASH_Init(DCP_Type *base, dcp_handle_t *handle, dcp_hash_ctx_t *ctx, dcp_hash_algo_t algo)
{
    status_t status;
    dcp_hash_ctx_internal_t *ctxInternal;
    BUILD_ASSURE(sizeof(dcp_hash_ctx_t) >= sizeof(dcp_hash_ctx_internal_t), dcp_hash_ctx_t_size);
    uint32_t i;
    status = dcp_hash_check_input_args(base, ctx, algo);
    if (status != kStatus_Success)
    {
        return status;
    }
    ctxInternal        = (dcp_hash_ctx_internal_t *)ctx;
    ctxInternal->algo  = algo;
    ctxInternal->blksz = 0u;
    for (i = 0; i < sizeof(ctxInternal->blk.w) / sizeof(ctxInternal->blk.w[0]); i++)
    {
        ctxInternal->blk.w[0] = 0u;
    }
    ctxInternal->state           = kDCP_StateHashInit;
    ctxInternal->fullMessageSize = 0;
    ctxInternal->handle          = handle;
    return status;
}