Home
last modified time | relevance | path

Searched refs:digest_ctx (Results 1 – 8 of 8) sorted by relevance

/third_party/libcoap/src/
Dcoap_notls.c279 coap_key_t *digest_ctx = coap_malloc_type(COAP_DIGEST_CTX, sizeof(coap_local_hash_t)); in coap_digest_setup() local
281 if (digest_ctx) { in coap_digest_setup()
282 memset(digest_ctx, 0, sizeof(coap_local_hash_t)); in coap_digest_setup()
285 return digest_ctx; in coap_digest_setup()
289 coap_digest_free(coap_digest_ctx_t *digest_ctx) { in coap_digest_free() argument
290 coap_free_type(COAP_DIGEST_CTX, digest_ctx); in coap_digest_free()
294 coap_digest_update(coap_digest_ctx_t *digest_ctx, in coap_digest_update() argument
297 coap_local_hash_t *local = (coap_local_hash_t *)digest_ctx; in coap_digest_update()
306 coap_digest_final(coap_digest_ctx_t *digest_ctx, in coap_digest_final() argument
308 coap_local_hash_t *local = (coap_local_hash_t *)digest_ctx; in coap_digest_final()
[all …]
Dcoap_tinydtls.c1455 dtls_sha256_ctx *digest_ctx = coap_malloc_type(COAP_STRING, sizeof(dtls_sha256_ctx)); in coap_digest_setup() local
1457 if (digest_ctx) { in coap_digest_setup()
1458 dtls_sha256_init(digest_ctx); in coap_digest_setup()
1461 return digest_ctx; in coap_digest_setup()
1465 coap_digest_free(coap_digest_ctx_t *digest_ctx) { in coap_digest_free() argument
1466 coap_free_type(COAP_STRING, digest_ctx); in coap_digest_free()
1470 coap_digest_update(coap_digest_ctx_t *digest_ctx, in coap_digest_update() argument
1473 dtls_sha256_update(digest_ctx, data, data_len); in coap_digest_update()
1479 coap_digest_final(coap_digest_ctx_t *digest_ctx, in coap_digest_final() argument
1481 dtls_sha256_final((uint8_t *)digest_buffer, digest_ctx); in coap_digest_final()
[all …]
Dcoap_mbedtls.c2560 mbedtls_sha256_context *digest_ctx = mbedtls_malloc(sizeof(mbedtls_sha256_context)); local
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) { argument
2577 mbedtls_sha256_free(digest_ctx);
2578 mbedtls_free(digest_ctx);
2582 coap_digest_update(coap_digest_ctx_t *digest_ctx, argument
[all …]
Dcoap_gnutls.c2902 gnutls_hash_hd_t digest_ctx; in coap_digest_setup() local
2904 if (gnutls_hash_init(&digest_ctx, GNUTLS_DIG_SHA256)) { in coap_digest_setup()
2907 return digest_ctx; in coap_digest_setup()
2911 coap_digest_free(coap_digest_ctx_t *digest_ctx) { in coap_digest_free() argument
2912 gnutls_hash_deinit(digest_ctx, NULL); in coap_digest_free()
2916 coap_digest_update(coap_digest_ctx_t *digest_ctx, in coap_digest_update() argument
2919 int ret = gnutls_hash(digest_ctx, data, data_len); in coap_digest_update()
2925 coap_digest_final(coap_digest_ctx_t *digest_ctx, in coap_digest_final() argument
2927 gnutls_hash_output(digest_ctx, (uint8_t *)digest_buffer); in coap_digest_final()
2929 coap_digest_free(digest_ctx); in coap_digest_final()
[all …]
Dcoap_openssl.c3576 EVP_MD_CTX *digest_ctx = EVP_MD_CTX_new(); in coap_digest_setup() local
3578 if (digest_ctx) { in coap_digest_setup()
3579 EVP_DigestInit_ex(digest_ctx, EVP_sha256(), NULL); in coap_digest_setup()
3581 return digest_ctx; in coap_digest_setup()
3585 coap_digest_free(coap_digest_ctx_t *digest_ctx) { in coap_digest_free() argument
3586 EVP_MD_CTX_free(digest_ctx); in coap_digest_free()
3590 coap_digest_update(coap_digest_ctx_t *digest_ctx, in coap_digest_update() argument
3593 return EVP_DigestUpdate(digest_ctx, data, data_len); in coap_digest_update()
3597 coap_digest_final(coap_digest_ctx_t *digest_ctx, in coap_digest_final() argument
3600 int ret = EVP_DigestFinal_ex(digest_ctx, (uint8_t *)digest_buffer, &size); in coap_digest_final()
[all …]
/third_party/node/deps/openssl/openssl/engines/
De_devcrypto.c674 struct digest_ctx { struct
748 struct digest_ctx *digest_ctx = in digest_init() local
749 (struct digest_ctx *)EVP_MD_CTX_get0_md_data(ctx); in digest_init()
753 digest_ctx->init_called = 1; in digest_init()
755 memset(&digest_ctx->sess, 0, sizeof(digest_ctx->sess)); in digest_init()
756 digest_ctx->sess.mac = digest_d->devcryptoid; in digest_init()
757 if (ioctl(cfd, CIOCGSESSION, &digest_ctx->sess) < 0) { in digest_init()
764 static int digest_op(struct digest_ctx *ctx, const void *src, size_t srclen, in digest_op()
781 struct digest_ctx *digest_ctx = in digest_update() local
782 (struct digest_ctx *)EVP_MD_CTX_get0_md_data(ctx); in digest_update()
[all …]
/third_party/openssl/engines/
De_devcrypto.c674 struct digest_ctx { struct
748 struct digest_ctx *digest_ctx = in digest_init() local
749 (struct digest_ctx *)EVP_MD_CTX_get0_md_data(ctx); in digest_init()
753 digest_ctx->init_called = 1; in digest_init()
755 memset(&digest_ctx->sess, 0, sizeof(digest_ctx->sess)); in digest_init()
756 digest_ctx->sess.mac = digest_d->devcryptoid; in digest_init()
757 if (ioctl(cfd, CIOCGSESSION, &digest_ctx->sess) < 0) { in digest_init()
764 static int digest_op(struct digest_ctx *ctx, const void *src, size_t srclen, in digest_op()
781 struct digest_ctx *digest_ctx = in digest_update() local
782 (struct digest_ctx *)EVP_MD_CTX_get0_md_data(ctx); in digest_update()
[all …]
/third_party/libcoap/include/coap3/
Dcoap_cache_internal.h80 void coap_digest_free(coap_digest_ctx_t *digest_ctx);
93 int coap_digest_update(coap_digest_ctx_t *digest_ctx,
109 int coap_digest_final(coap_digest_ctx_t *digest_ctx,