Пример #1
0
/*
 * SHA-256 context setup
 */
void mbedtls_sha256_starts(mbedtls_sha256_context *ctx, int is224)
{
    if (ctx->active_ctx == &ctx->hw_ctx) {
        mbedtls_sha256_hw_starts(&ctx->hw_ctx, is224);
    } else if (ctx->active_ctx == &ctx->sw_ctx) {
        mbedtls_sha256_sw_starts(&ctx->sw_ctx, is224);
    }
}
Пример #2
0
/*
 * SHA-256 context setup
 */
void mbedtls_sha256_starts(mbedtls_sha256_context *ctx, int is224)
{
    if (ctx->ishw) {
        mbedtls_sha256_hw_starts(&ctx->hw_ctx, is224);
    }
    else {
        mbedtls_sha256_sw_starts(&ctx->sw_ctx, is224);
    }
}