Lines Matching defs:digest_ctx
2560 mbedtls_sha256_context *digest_ctx = mbedtls_malloc(sizeof(mbedtls_sha256_context));
2562 if (digest_ctx) {
2563 mbedtls_sha256_init(digest_ctx);
2565 if (mbedtls_sha256_starts_ret(digest_ctx, 0) != 0) {
2567 if (mbedtls_sha256_starts(digest_ctx, 0) != 0) {
2572 return digest_ctx;
2576 coap_digest_free(coap_digest_ctx_t *digest_ctx) {
2577 mbedtls_sha256_free(digest_ctx);
2578 mbedtls_free(digest_ctx);
2582 coap_digest_update(coap_digest_ctx_t *digest_ctx,
2586 int ret = mbedtls_sha256_update_ret(digest_ctx, data, data_len);
2588 int ret = mbedtls_sha256_update(digest_ctx, data, data_len);
2595 coap_digest_final(coap_digest_ctx_t *digest_ctx,
2598 int ret = mbedtls_sha256_finish_ret(digest_ctx, (uint8_t *)digest_buffer);
2600 int ret = mbedtls_sha256_finish(digest_ctx, (uint8_t *)digest_buffer);
2603 coap_digest_free(digest_ctx);