/external/mbedtls/library/ |
D | md.c | 243 if( ctx->md_ctx != NULL ) in mbedtls_md_free() 249 mbedtls_md5_free( ctx->md_ctx ); in mbedtls_md_free() 254 mbedtls_ripemd160_free( ctx->md_ctx ); in mbedtls_md_free() 259 mbedtls_sha1_free( ctx->md_ctx ); in mbedtls_md_free() 264 mbedtls_sha256_free( ctx->md_ctx ); in mbedtls_md_free() 269 mbedtls_sha256_free( ctx->md_ctx ); in mbedtls_md_free() 274 mbedtls_sha512_free( ctx->md_ctx ); in mbedtls_md_free() 279 mbedtls_sha512_free( ctx->md_ctx ); in mbedtls_md_free() 286 mbedtls_free( ctx->md_ctx ); in mbedtls_md_free() 313 mbedtls_md5_clone( dst->md_ctx, src->md_ctx ); in mbedtls_md_clone() [all …]
|
D | hmac_drbg.c | 59 size_t md_len = mbedtls_md_get_size( ctx->md_ctx.md_info ); in mbedtls_hmac_drbg_update() 68 if( ( ret = mbedtls_md_hmac_reset( &ctx->md_ctx ) ) != 0 ) in mbedtls_hmac_drbg_update() 70 if( ( ret = mbedtls_md_hmac_update( &ctx->md_ctx, in mbedtls_hmac_drbg_update() 73 if( ( ret = mbedtls_md_hmac_update( &ctx->md_ctx, in mbedtls_hmac_drbg_update() 78 if( ( ret = mbedtls_md_hmac_update( &ctx->md_ctx, in mbedtls_hmac_drbg_update() 82 if( ( ret = mbedtls_md_hmac_finish( &ctx->md_ctx, K ) ) != 0 ) in mbedtls_hmac_drbg_update() 86 if( ( ret = mbedtls_md_hmac_starts( &ctx->md_ctx, K, md_len ) ) != 0 ) in mbedtls_hmac_drbg_update() 88 if( ( ret = mbedtls_md_hmac_update( &ctx->md_ctx, in mbedtls_hmac_drbg_update() 91 if( ( ret = mbedtls_md_hmac_finish( &ctx->md_ctx, ctx->V ) ) != 0 ) in mbedtls_hmac_drbg_update() 109 if( ( ret = mbedtls_md_setup( &ctx->md_ctx, md_info, 1 ) ) != 0 ) in mbedtls_hmac_drbg_seed_buf() [all …]
|
D | pkcs12.c | 225 mbedtls_md_context_t md_ctx; in calculate_hashes() local 230 mbedtls_md_init( &md_ctx ); in calculate_hashes() 232 if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 0 ) ) != 0 ) in calculate_hashes() 235 if( ( ret = mbedtls_md_starts( &md_ctx ) ) != 0 ) in calculate_hashes() 238 if( ( ret = mbedtls_md_update( &md_ctx, diversifier, v ) ) != 0 ) in calculate_hashes() 243 if( ( ret = mbedtls_md_update( &md_ctx, salt_block, v ) ) != 0 ) in calculate_hashes() 249 if( ( ret = mbedtls_md_update( &md_ctx, pwd_block, v ) ) != 0 ) in calculate_hashes() 253 if( ( ret = mbedtls_md_finish( &md_ctx, hash_output ) ) != 0 ) in calculate_hashes() 265 mbedtls_md_free( &md_ctx ); in calculate_hashes()
|
/external/openthread/third_party/mbedtls/repo/library/ |
D | md.c | 275 if( ctx->md_ctx != NULL ) in mbedtls_md_free() 281 mbedtls_md2_free( ctx->md_ctx ); in mbedtls_md_free() 286 mbedtls_md4_free( ctx->md_ctx ); in mbedtls_md_free() 291 mbedtls_md5_free( ctx->md_ctx ); in mbedtls_md_free() 296 mbedtls_ripemd160_free( ctx->md_ctx ); in mbedtls_md_free() 301 mbedtls_sha1_free( ctx->md_ctx ); in mbedtls_md_free() 307 mbedtls_sha256_free( ctx->md_ctx ); in mbedtls_md_free() 315 mbedtls_sha512_free( ctx->md_ctx ); in mbedtls_md_free() 322 mbedtls_free( ctx->md_ctx ); in mbedtls_md_free() 349 mbedtls_md2_clone( dst->md_ctx, src->md_ctx ); in mbedtls_md_clone() [all …]
|
D | hmac_drbg.c | 66 size_t md_len = mbedtls_md_get_size( ctx->md_ctx.md_info ); in mbedtls_hmac_drbg_update_ret() 75 if( ( ret = mbedtls_md_hmac_reset( &ctx->md_ctx ) ) != 0 ) in mbedtls_hmac_drbg_update_ret() 77 if( ( ret = mbedtls_md_hmac_update( &ctx->md_ctx, in mbedtls_hmac_drbg_update_ret() 80 if( ( ret = mbedtls_md_hmac_update( &ctx->md_ctx, in mbedtls_hmac_drbg_update_ret() 85 if( ( ret = mbedtls_md_hmac_update( &ctx->md_ctx, in mbedtls_hmac_drbg_update_ret() 89 if( ( ret = mbedtls_md_hmac_finish( &ctx->md_ctx, K ) ) != 0 ) in mbedtls_hmac_drbg_update_ret() 93 if( ( ret = mbedtls_md_hmac_starts( &ctx->md_ctx, K, md_len ) ) != 0 ) in mbedtls_hmac_drbg_update_ret() 95 if( ( ret = mbedtls_md_hmac_update( &ctx->md_ctx, in mbedtls_hmac_drbg_update_ret() 98 if( ( ret = mbedtls_md_hmac_finish( &ctx->md_ctx, ctx->V ) ) != 0 ) in mbedtls_hmac_drbg_update_ret() 125 if( ( ret = mbedtls_md_setup( &ctx->md_ctx, md_info, 1 ) ) != 0 ) in mbedtls_hmac_drbg_seed_buf() [all …]
|
D | pkcs12.c | 276 mbedtls_md_context_t md_ctx; in mbedtls_pkcs12_derivation() local 295 mbedtls_md_init( &md_ctx ); in mbedtls_pkcs12_derivation() 297 if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 0 ) ) != 0 ) in mbedtls_pkcs12_derivation() 322 if( ( ret = mbedtls_md_starts( &md_ctx ) ) != 0 ) in mbedtls_pkcs12_derivation() 325 if( ( ret = mbedtls_md_update( &md_ctx, diversifier, v ) ) != 0 ) in mbedtls_pkcs12_derivation() 330 if( ( ret = mbedtls_md_update( &md_ctx, salt_block, v )) != 0 ) in mbedtls_pkcs12_derivation() 336 if( ( ret = mbedtls_md_update( &md_ctx, pwd_block, v )) != 0 ) in mbedtls_pkcs12_derivation() 340 if( ( ret = mbedtls_md_finish( &md_ctx, hash_output ) ) != 0 ) in mbedtls_pkcs12_derivation() 399 mbedtls_md_free( &md_ctx ); in mbedtls_pkcs12_derivation()
|
D | rsa.c | 1091 size_t slen, mbedtls_md_context_t *md_ctx ) in mgf_mask() argument 1103 hlen = mbedtls_md_get_size( md_ctx->md_info ); in mgf_mask() 1114 if( ( ret = mbedtls_md_starts( md_ctx ) ) != 0 ) in mgf_mask() 1116 if( ( ret = mbedtls_md_update( md_ctx, src, slen ) ) != 0 ) in mgf_mask() 1118 if( ( ret = mbedtls_md_update( md_ctx, counter, 4 ) ) != 0 ) in mgf_mask() 1120 if( ( ret = mbedtls_md_finish( md_ctx, mask ) ) != 0 ) in mgf_mask() 1156 mbedtls_md_context_t md_ctx; in mbedtls_rsa_rsaes_oaep_encrypt() local 1201 mbedtls_md_init( &md_ctx ); in mbedtls_rsa_rsaes_oaep_encrypt() 1202 if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 0 ) ) != 0 ) in mbedtls_rsa_rsaes_oaep_encrypt() 1207 &md_ctx ) ) != 0 ) in mbedtls_rsa_rsaes_oaep_encrypt() [all …]
|
/external/openthread/third_party/mbedtls/repo/programs/aes/ |
D | crypt_and_hash.c | 104 mbedtls_md_context_t md_ctx; in main() local 115 mbedtls_md_init( &md_ctx ); in main() 200 if( mbedtls_md_setup( &md_ctx, md_info, 1 ) != 0 ) in main() 284 if( mbedtls_md_starts( &md_ctx ) != 0 ) in main() 289 if( mbedtls_md_update( &md_ctx, buffer, 8 ) != 0 ) in main() 294 if( mbedtls_md_update( &md_ctx, ( unsigned char * ) p, strlen( p ) ) in main() 300 if( mbedtls_md_finish( &md_ctx, digest ) != 0 ) in main() 326 if( mbedtls_md_starts( &md_ctx ) != 0 ) in main() 332 if( mbedtls_md_update( &md_ctx, digest, 32 ) != 0 ) in main() 338 if( mbedtls_md_update( &md_ctx, key, keylen ) != 0 ) in main() [all …]
|
/external/mbedtls/programs/aes/ |
D | crypt_and_hash.c | 90 mbedtls_md_context_t md_ctx; in main() local 101 mbedtls_md_init( &md_ctx ); in main() 185 if( mbedtls_md_setup( &md_ctx, md_info, 1 ) != 0 ) in main() 269 if( mbedtls_md_starts( &md_ctx ) != 0 ) in main() 274 if( mbedtls_md_update( &md_ctx, buffer, 8 ) != 0 ) in main() 279 if( mbedtls_md_update( &md_ctx, ( unsigned char * ) p, strlen( p ) ) in main() 285 if( mbedtls_md_finish( &md_ctx, digest ) != 0 ) in main() 311 if( mbedtls_md_starts( &md_ctx ) != 0 ) in main() 317 if( mbedtls_md_update( &md_ctx, digest, 32 ) != 0 ) in main() 323 if( mbedtls_md_update( &md_ctx, key, keylen ) != 0 ) in main() [all …]
|
/external/rust/crates/quiche/deps/boringssl/src/crypto/fipsmodule/hmac/ |
D | hmac.c | 87 EVP_MD_CTX_init(&ctx->md_ctx); in HMAC_CTX_init() 101 EVP_MD_CTX_cleanup(&ctx->md_ctx); in HMAC_CTX_cleanup() 136 if (!EVP_DigestInit_ex(&ctx->md_ctx, md, impl) || in HMAC_Init_ex() 137 !EVP_DigestUpdate(&ctx->md_ctx, key, key_len) || in HMAC_Init_ex() 138 !EVP_DigestFinal_ex(&ctx->md_ctx, key_block, &key_block_len)) { in HMAC_Init_ex() 170 if (!EVP_MD_CTX_copy_ex(&ctx->md_ctx, &ctx->i_ctx)) { in HMAC_Init_ex() 178 return EVP_DigestUpdate(&ctx->md_ctx, data, data_len); in HMAC_Update() 187 if (!EVP_DigestFinal_ex(&ctx->md_ctx, buf, &i) || in HMAC_Final() 188 !EVP_MD_CTX_copy_ex(&ctx->md_ctx, &ctx->o_ctx) || in HMAC_Final() 189 !EVP_DigestUpdate(&ctx->md_ctx, buf, i) || in HMAC_Final() [all …]
|
/external/cronet/third_party/boringssl/src/crypto/fipsmodule/hmac/ |
D | hmac.c | 97 EVP_MD_CTX_init(&ctx->md_ctx); in HMAC_CTX_init() 111 EVP_MD_CTX_cleanup(&ctx->md_ctx); in HMAC_CTX_cleanup() 118 EVP_MD_CTX_cleanse(&ctx->md_ctx); in HMAC_CTX_cleanse() 157 if (!EVP_DigestInit_ex(&ctx->md_ctx, md, impl) || in HMAC_Init_ex() 158 !EVP_DigestUpdate(&ctx->md_ctx, key, key_len) || in HMAC_Init_ex() 159 !EVP_DigestFinal_ex(&ctx->md_ctx, key_block, &key_block_len)) { in HMAC_Init_ex() 189 ret = EVP_MD_CTX_copy_ex(&ctx->md_ctx, &ctx->i_ctx); in HMAC_Init_ex() 197 return EVP_DigestUpdate(&ctx->md_ctx, data, data_len); in HMAC_Update() 208 if (!EVP_DigestFinal_ex(&ctx->md_ctx, buf, &i) || in HMAC_Final() 209 !EVP_MD_CTX_copy_ex(&ctx->md_ctx, &ctx->o_ctx) || in HMAC_Final() [all …]
|
/external/boringssl/src/crypto/fipsmodule/hmac/ |
D | hmac.c | 97 EVP_MD_CTX_init(&ctx->md_ctx); in HMAC_CTX_init() 111 EVP_MD_CTX_cleanup(&ctx->md_ctx); in HMAC_CTX_cleanup() 118 EVP_MD_CTX_cleanse(&ctx->md_ctx); in HMAC_CTX_cleanse() 157 if (!EVP_DigestInit_ex(&ctx->md_ctx, md, impl) || in HMAC_Init_ex() 158 !EVP_DigestUpdate(&ctx->md_ctx, key, key_len) || in HMAC_Init_ex() 159 !EVP_DigestFinal_ex(&ctx->md_ctx, key_block, &key_block_len)) { in HMAC_Init_ex() 189 ret = EVP_MD_CTX_copy_ex(&ctx->md_ctx, &ctx->i_ctx); in HMAC_Init_ex() 197 return EVP_DigestUpdate(&ctx->md_ctx, data, data_len); in HMAC_Update() 208 if (!EVP_DigestFinal_ex(&ctx->md_ctx, buf, &i) || in HMAC_Final() 209 !EVP_MD_CTX_copy_ex(&ctx->md_ctx, &ctx->o_ctx) || in HMAC_Final() [all …]
|
/external/fsverity-utils/lib/ |
D | hash_algs.c | 22 EVP_MD_CTX *md_ctx; member 31 ret = EVP_DigestInit_ex(ctx->md_ctx, ctx->md, NULL); in openssl_digest_init() 41 ret = EVP_DigestUpdate(ctx->md_ctx, data, size); in openssl_digest_update() 50 ret = EVP_DigestFinal_ex(ctx->md_ctx, digest, NULL); in openssl_digest_final() 63 EVP_MD_CTX_destroy(ctx->md_ctx); in openssl_digest_ctx_free() 86 ctx->md_ctx = EVP_MD_CTX_create(); in openssl_digest_ctx_create() 87 if (!ctx->md_ctx) { in openssl_digest_ctx_create() 99 EVP_MD_CTX_destroy(ctx->md_ctx); in openssl_digest_ctx_create()
|
/external/rust/crates/grpcio-sys/grpc/src/core/lib/security/credentials/jwt/ |
D | json_token.cc | 227 EVP_MD_CTX* md_ctx = nullptr; in compute_and_encode_signature() local 233 md_ctx = EVP_MD_CTX_create(); in compute_and_encode_signature() 234 if (md_ctx == nullptr) { in compute_and_encode_signature() 239 if (EVP_DigestSignInit(md_ctx, nullptr, md, nullptr, key) != 1) { in compute_and_encode_signature() 243 if (EVP_DigestSignUpdate(md_ctx, to_sign, strlen(to_sign)) != 1) { in compute_and_encode_signature() 247 if (EVP_DigestSignFinal(md_ctx, nullptr, &sig_len) != 1) { in compute_and_encode_signature() 252 if (EVP_DigestSignFinal(md_ctx, sig, &sig_len) != 1) { in compute_and_encode_signature() 260 if (md_ctx != nullptr) EVP_MD_CTX_destroy(md_ctx); in compute_and_encode_signature()
|
/external/grpc-grpc/src/core/lib/security/credentials/jwt/ |
D | json_token.cc | 253 EVP_MD_CTX* md_ctx = nullptr; in compute_and_encode_signature() local 259 md_ctx = EVP_MD_CTX_create(); in compute_and_encode_signature() 260 if (md_ctx == nullptr) { in compute_and_encode_signature() 265 if (EVP_DigestSignInit(md_ctx, nullptr, md, nullptr, key) != 1) { in compute_and_encode_signature() 269 if (EVP_DigestSignUpdate(md_ctx, to_sign, strlen(to_sign)) != 1) { in compute_and_encode_signature() 273 if (EVP_DigestSignFinal(md_ctx, nullptr, &sig_len) != 1) { in compute_and_encode_signature() 278 if (EVP_DigestSignFinal(md_ctx, sig, &sig_len) != 1) { in compute_and_encode_signature() 286 if (md_ctx != nullptr) EVP_MD_CTX_destroy(md_ctx); in compute_and_encode_signature()
|
/external/rust/crates/quiche/deps/boringssl/src/crypto/evp/ |
D | evp_extra_test.cc | 379 bssl::ScopedEVP_MD_CTX md_ctx; in TEST() local 381 EVP_DigestSignInit(md_ctx.get(), NULL, EVP_sha256(), NULL, pkey.get())); in TEST() 382 ASSERT_TRUE(EVP_DigestSignUpdate(md_ctx.get(), kMsg, sizeof(kMsg))); in TEST() 386 ASSERT_TRUE(EVP_DigestSignFinal(md_ctx.get(), NULL, &sig_len)); in TEST() 393 ASSERT_TRUE(EVP_DigestSignFinal(md_ctx.get(), sig.data(), &sig_len)); in TEST() 397 md_ctx.Reset(); in TEST() 399 EVP_DigestVerifyInit(md_ctx.get(), NULL, EVP_sha256(), NULL, pkey.get())); in TEST() 400 ASSERT_TRUE(EVP_DigestVerifyUpdate(md_ctx.get(), kMsg, sizeof(kMsg))); in TEST() 401 ASSERT_TRUE(EVP_DigestVerifyFinal(md_ctx.get(), sig.data(), sig_len)); in TEST() 406 bssl::ScopedEVP_MD_CTX md_ctx; in TEST() local [all …]
|
/external/cronet/third_party/boringssl/src/crypto/x509/ |
D | x509_cmp.c | 190 EVP_MD_CTX md_ctx; in X509_NAME_hash_old() local 196 EVP_MD_CTX_init(&md_ctx); in X509_NAME_hash_old() 198 if (EVP_DigestInit_ex(&md_ctx, EVP_md5(), NULL) && in X509_NAME_hash_old() 199 EVP_DigestUpdate(&md_ctx, x->bytes->data, x->bytes->length) && in X509_NAME_hash_old() 200 EVP_DigestFinal_ex(&md_ctx, md, NULL)) { in X509_NAME_hash_old() 205 EVP_MD_CTX_cleanup(&md_ctx); in X509_NAME_hash_old()
|
/external/boringssl/src/crypto/x509/ |
D | x509_cmp.c | 190 EVP_MD_CTX md_ctx; in X509_NAME_hash_old() local 196 EVP_MD_CTX_init(&md_ctx); in X509_NAME_hash_old() 198 if (EVP_DigestInit_ex(&md_ctx, EVP_md5(), NULL) && in X509_NAME_hash_old() 199 EVP_DigestUpdate(&md_ctx, x->bytes->data, x->bytes->length) && in X509_NAME_hash_old() 200 EVP_DigestFinal_ex(&md_ctx, md, NULL)) { in X509_NAME_hash_old() 205 EVP_MD_CTX_cleanup(&md_ctx); in X509_NAME_hash_old()
|
/external/boringssl/src/crypto/fipsmodule/service_indicator/ |
D | service_indicator_test.cc | 1219 bssl::ScopedEVP_MD_CTX md_ctx; in TEST_P() local 1223 approved, EVP_DigestSignInit(md_ctx.get(), &pctx, test.func(), nullptr, in TEST_P() 1236 EVP_DigestSignUpdate(md_ctx.get(), kPlaintext, sizeof(kPlaintext)))); in TEST_P() 1242 approved, EVP_DigestSignFinal(md_ctx.get(), nullptr, &sig_len))); in TEST_P() 1247 approved, EVP_DigestSignFinal(md_ctx.get(), signature.data(), &sig_len))); in TEST_P() 1251 md_ctx.Reset(); in TEST_P() 1254 approved, EVP_DigestSignInit(md_ctx.get(), &pctx, test.func(), nullptr, in TEST_P() 1266 approved, EVP_DigestSign(md_ctx.get(), oneshot_output.data(), &sig_len, in TEST_P() 1273 md_ctx.Reset(); in TEST_P() 1274 ASSERT_TRUE(EVP_DigestSignInit(md_ctx.get(), &pctx, test.func(), nullptr, in TEST_P() [all …]
|
/external/rust/crates/openssl/src/ |
D | sign.rs | 115 md_ctx: *mut ffi::EVP_MD_CTX, field 127 EVP_MD_CTX_free(self.md_ctx); in drop() 191 md_ctx: ctx, in new_intern() 273 self.md_ctx, in update() 298 self.md_ctx, in len_intern() 311 self.md_ctx, in len_intern() 333 self.md_ctx, in sign() 372 self.md_ctx, in sign_oneshot() 409 md_ctx: *mut ffi::EVP_MD_CTX, field 421 EVP_MD_CTX_free(self.md_ctx); in drop() [all …]
|
/external/cronet/third_party/boringssl/src/crypto/fipsmodule/service_indicator/ |
D | service_indicator_test.cc | 1231 bssl::ScopedEVP_MD_CTX md_ctx; in TEST_P() local 1235 approved, EVP_DigestSignInit(md_ctx.get(), &pctx, test.func(), nullptr, in TEST_P() 1248 EVP_DigestSignUpdate(md_ctx.get(), kPlaintext, sizeof(kPlaintext)))); in TEST_P() 1254 approved, EVP_DigestSignFinal(md_ctx.get(), nullptr, &sig_len))); in TEST_P() 1259 approved, EVP_DigestSignFinal(md_ctx.get(), signature.data(), &sig_len))); in TEST_P() 1263 md_ctx.Reset(); in TEST_P() 1266 approved, EVP_DigestSignInit(md_ctx.get(), &pctx, test.func(), nullptr, in TEST_P() 1278 approved, EVP_DigestSign(md_ctx.get(), oneshot_output.data(), &sig_len, in TEST_P() 1285 md_ctx.Reset(); in TEST_P() 1286 ASSERT_TRUE(EVP_DigestSignInit(md_ctx.get(), &pctx, test.func(), nullptr, in TEST_P() [all …]
|
/external/tensorflow/tensorflow/core/platform/cloud/ |
D | oauth_client_test.cc | 160 auto md_ctx = EVP_MD_CTX_create(); in TEST() local 163 ASSERT_EQ(1, EVP_DigestVerifyInit(md_ctx, nullptr, md, nullptr, key)); in TEST() 164 ASSERT_EQ(1, EVP_DigestVerifyUpdate(md_ctx, header_dot_claim.c_str(), in TEST() 168 md_ctx, in TEST() 175 EVP_MD_CTX_destroy(md_ctx); in TEST()
|
/external/mbedtls/programs/hash/ |
D | generic_sum.c | 165 mbedtls_md_context_t md_ctx; in main() local 167 mbedtls_md_init( &md_ctx ); in main() 197 if( mbedtls_md_setup( &md_ctx, md_info, 0 ) ) in main() 217 mbedtls_md_free( &md_ctx ); in main()
|
/external/openthread/third_party/mbedtls/repo/programs/hash/ |
D | generic_sum.c | 179 mbedtls_md_context_t md_ctx; in main() local 181 mbedtls_md_init( &md_ctx ); in main() 216 if( mbedtls_md_setup( &md_ctx, md_info, 0 ) ) in main() 236 mbedtls_md_free( &md_ctx ); in main()
|
/external/rust/crates/quiche/deps/boringssl/src/crypto/fipsmodule/digest/ |
D | digests.c | 275 static void md5_sha1_init(EVP_MD_CTX *md_ctx) { in md5_sha1_init() argument 276 MD5_SHA1_CTX *ctx = md_ctx->md_data; in md5_sha1_init() 280 static void md5_sha1_update(EVP_MD_CTX *md_ctx, const void *data, in md5_sha1_update() argument 282 MD5_SHA1_CTX *ctx = md_ctx->md_data; in md5_sha1_update() 287 static void md5_sha1_final(EVP_MD_CTX *md_ctx, uint8_t *out) { in md5_sha1_final() argument 288 MD5_SHA1_CTX *ctx = md_ctx->md_data; in md5_sha1_final()
|