Lines Matching refs:ctx
268 static int pkcs5_pbkdf2_hmac(mbedtls_md_context_t *ctx,
278 unsigned char md_size = mbedtls_md_get_size(ctx->md_info);
292 if ((ret = mbedtls_md_hmac_starts(ctx, password, plen)) != 0) {
298 if ((ret = mbedtls_md_hmac_update(ctx, salt, slen)) != 0) {
302 if ((ret = mbedtls_md_hmac_update(ctx, counter, 4)) != 0) {
306 if ((ret = mbedtls_md_hmac_finish(ctx, work)) != 0) {
310 if ((ret = mbedtls_md_hmac_reset(ctx)) != 0) {
319 if ((ret = mbedtls_md_hmac_update(ctx, md1, md_size)) != 0) {
323 if ((ret = mbedtls_md_hmac_finish(ctx, md1)) != 0) {
327 if ((ret = mbedtls_md_hmac_reset(ctx)) != 0) {
358 int mbedtls_pkcs5_pbkdf2_hmac(mbedtls_md_context_t *ctx,
364 return pkcs5_pbkdf2_hmac(ctx, password, plen, salt, slen, iteration_count,