/external/fsverity-utils/lib/ |
D | lib_private.h | 34 struct hash_ctx *(*create_ctx)(const struct fsverity_hash_alg *alg); 39 struct hash_ctx { struct 41 void (*init)(struct hash_ctx *ctx); argument 42 void (*update)(struct hash_ctx *ctx, const void *data, size_t size); argument 43 void (*final)(struct hash_ctx *ctx, u8 *out); argument 44 void (*free)(struct hash_ctx *ctx); argument 47 void libfsverity_hash_init(struct hash_ctx *ctx); 48 void libfsverity_hash_update(struct hash_ctx *ctx, const void *data, 50 void libfsverity_hash_final(struct hash_ctx *ctx, u8 *digest); 51 void libfsverity_hash_full(struct hash_ctx *ctx, const void *data, size_t size, [all …]
|
D | hash_algs.c | 21 struct hash_ctx base; /* must be first */ 26 static void openssl_digest_init(struct hash_ctx *_ctx) in openssl_digest_init() 35 static void openssl_digest_update(struct hash_ctx *_ctx, in openssl_digest_update() 45 static void openssl_digest_final(struct hash_ctx *_ctx, u8 *digest) in openssl_digest_final() 54 static void openssl_digest_ctx_free(struct hash_ctx *_ctx) in openssl_digest_ctx_free() 67 static struct hash_ctx * 105 static struct hash_ctx *create_sha256_ctx(const struct fsverity_hash_alg *alg) in create_sha256_ctx() 110 static struct hash_ctx *create_sha512_ctx(const struct fsverity_hash_alg *alg) in create_sha512_ctx() 117 void libfsverity_hash_init(struct hash_ctx *ctx) in libfsverity_hash_init() 122 void libfsverity_hash_update(struct hash_ctx *ctx, const void *data, in libfsverity_hash_update() [all …]
|
D | compute_digest.c | 29 static bool hash_one_block(struct hash_ctx *hash, struct block_buffer *cur, in hash_one_block() 53 u64 file_size, struct hash_ctx *hash, in compute_root_hash() 153 struct hash_ctx *hash = NULL; in libfsverity_compute_digest()
|
/external/libwebsockets/plugins/generic-sessions/ |
D | utils.c | 391 struct lws_genhash_ctx hash_ctx; in lwsgs_check_credentials() local 403 if (lws_genhash_init(&hash_ctx, LWS_GENHASH_TYPE_SHA256) || in lwsgs_check_credentials() 404 lws_genhash_update(&hash_ctx, password, strlen(password)) || in lwsgs_check_credentials() 405 lws_genhash_update(&hash_ctx, "-", 1) || in lwsgs_check_credentials() 406 lws_genhash_update(&hash_ctx, vhd->confounder, strlen(vhd->confounder)) || in lwsgs_check_credentials() 407 lws_genhash_update(&hash_ctx, "-", 1) || in lwsgs_check_credentials() 408 lws_genhash_update(&hash_ctx, u.pwsalt.id, strlen(u.pwsalt.id)) || in lwsgs_check_credentials() 409 lws_genhash_destroy(&hash_ctx, hash_bin.bin)) { in lwsgs_check_credentials() 410 lws_genhash_destroy(&hash_ctx, NULL); in lwsgs_check_credentials() 427 struct lws_genhash_ctx hash_ctx; in lwsgs_hash_password() local [all …]
|
/external/libwebsockets/lib/jose/jws/ |
D | jws.c | 452 struct lws_genhash_ctx hash_ctx; in lws_jws_sig_confirm() local 499 if (lws_genhash_init(&hash_ctx, jose.alg->hash_type)) in lws_jws_sig_confirm() 509 if (lws_genhash_update(&hash_ctx, map_b64->buf[LJWS_JOSE], in lws_jws_sig_confirm() 511 lws_genhash_update(&hash_ctx, ".", 1) || in lws_jws_sig_confirm() 512 lws_genhash_update(&hash_ctx, map_b64->buf[LJWS_PYLD], in lws_jws_sig_confirm() 514 lws_genhash_destroy(&hash_ctx, digest)) { in lws_jws_sig_confirm() 515 lws_genhash_destroy(&hash_ctx, NULL); in lws_jws_sig_confirm() 620 if (lws_genhash_init(&hash_ctx, jose.alg->hash_type) || in lws_jws_sig_confirm() 621 lws_genhash_update(&hash_ctx, map_b64->buf[LJWS_JOSE], in lws_jws_sig_confirm() 623 lws_genhash_update(&hash_ctx, ".", 1) || in lws_jws_sig_confirm() [all …]
|
/external/libwebsockets/minimal-examples/api-tests/api-test-jose/ |
D | jws.c | 411 struct lws_genhash_ctx hash_ctx; in test_jws_ES256() local 496 if (lws_genhash_init(&hash_ctx, jose.alg->hash_type) || in test_jws_ES256() 497 lws_genhash_update(&hash_ctx, jws.map_b64.buf[LJWS_JOSE], in test_jws_ES256() 499 lws_genhash_update(&hash_ctx, ".", 1) || in test_jws_ES256() 500 lws_genhash_update(&hash_ctx, jws.map_b64.buf[LJWS_PYLD], in test_jws_ES256() 502 lws_genhash_destroy(&hash_ctx, digest)) { in test_jws_ES256() 503 lws_genhash_destroy(&hash_ctx, NULL); in test_jws_ES256() 572 struct lws_genhash_ctx hash_ctx; in test_jws_ES512() local 657 if (lws_genhash_init(&hash_ctx, jose.alg->hash_type) || in test_jws_ES512() 658 lws_genhash_update(&hash_ctx, jws.map_b64.buf[LJWS_JOSE], in test_jws_ES512() [all …]
|
/external/libwebsockets/lib/jose/jwe/ |
D | jwe.c | 213 struct lws_genhash_ctx hash_ctx; in lws_jwa_concat_kdf() local 279 if (lws_genhash_init(&hash_ctx, LWS_GENHASH_TYPE_SHA256)) in lws_jwa_concat_kdf() 283 lws_genhash_update(&hash_ctx, be32(ctr++, &t), 4) || in lws_jwa_concat_kdf() 285 lws_genhash_update(&hash_ctx, shared_secret, sslen) || in lws_jwa_concat_kdf() 287 lws_genhash_update(&hash_ctx, be32(strlen(aid), &t), 4) || in lws_jwa_concat_kdf() 288 lws_genhash_update(&hash_ctx, aid, aidlen) || in lws_jwa_concat_kdf() 289 lws_genhash_update(&hash_ctx, in lws_jwa_concat_kdf() 291 lws_genhash_update(&hash_ctx, jwe->jose.e[LJJHI_APU].buf, in lws_jwa_concat_kdf() 293 lws_genhash_update(&hash_ctx, in lws_jwa_concat_kdf() 295 lws_genhash_update(&hash_ctx, jwe->jose.e[LJJHI_APV].buf, in lws_jwa_concat_kdf() [all …]
|
/external/python/cryptography/src/cryptography/hazmat/backends/openssl/ |
D | utils.py | 40 hash_ctx = hashes.Hash(algorithm, backend) 41 hash_ctx.update(data) 42 data = hash_ctx.finalize()
|
/external/boringssl/src/crypto/hrss/ |
D | hrss.c | 1955 SHA256_CTX hash_ctx; in HRSS_encap() local 1956 SHA256_Init(&hash_ctx); in HRSS_encap() 1957 SHA256_Update(&hash_ctx, kSharedKey, sizeof(kSharedKey)); in HRSS_encap() 1958 SHA256_Update(&hash_ctx, m_bytes, sizeof(m_bytes)); in HRSS_encap() 1959 SHA256_Update(&hash_ctx, r_bytes, sizeof(r_bytes)); in HRSS_encap() 1960 SHA256_Update(&hash_ctx, out_ciphertext, POLY_BYTES); in HRSS_encap() 1961 SHA256_Final(out_shared_key, &hash_ctx); in HRSS_encap() 1982 SHA256_CTX hash_ctx; in HRSS_decap() local 1983 SHA256_Init(&hash_ctx); in HRSS_decap() 1984 SHA256_Update(&hash_ctx, masked_key, sizeof(masked_key)); in HRSS_decap() [all …]
|
/external/rust/crates/quiche/deps/boringssl/src/crypto/hrss/ |
D | hrss.c | 1955 SHA256_CTX hash_ctx; in HRSS_encap() local 1956 SHA256_Init(&hash_ctx); in HRSS_encap() 1957 SHA256_Update(&hash_ctx, kSharedKey, sizeof(kSharedKey)); in HRSS_encap() 1958 SHA256_Update(&hash_ctx, m_bytes, sizeof(m_bytes)); in HRSS_encap() 1959 SHA256_Update(&hash_ctx, r_bytes, sizeof(r_bytes)); in HRSS_encap() 1960 SHA256_Update(&hash_ctx, out_ciphertext, POLY_BYTES); in HRSS_encap() 1961 SHA256_Final(out_shared_key, &hash_ctx); in HRSS_encap() 1982 SHA256_CTX hash_ctx; in HRSS_decap() local 1983 SHA256_Init(&hash_ctx); in HRSS_decap() 1984 SHA256_Update(&hash_ctx, masked_key, sizeof(masked_key)); in HRSS_decap() [all …]
|
/external/libwebsockets/lib/tls/mbedtls/ |
D | mbedtls-server.c | 476 struct lws_genhash_ctx hash_ctx; in lws_tls_acme_sni_cert_create() local 539 if (lws_genhash_init(&hash_ctx, LWS_GENHASH_TYPE_SHA256)) in lws_tls_acme_sni_cert_create() 542 if (lws_genhash_update(&hash_ctx, buf, lws_ptr_diff(p, buf))) { in lws_tls_acme_sni_cert_create() 543 lws_genhash_destroy(&hash_ctx, NULL); in lws_tls_acme_sni_cert_create() 547 if (lws_genhash_destroy(&hash_ctx, digest)) in lws_tls_acme_sni_cert_create()
|
/external/libwebsockets/lib/jose/jwk/ |
D | jwk.c | 819 struct lws_genhash_ctx hash_ctx; in lws_jwk_rfc7638_fingerprint() local 829 if (lws_genhash_init(&hash_ctx, LWS_GENHASH_TYPE_SHA256)) in lws_jwk_rfc7638_fingerprint() 832 if (lws_genhash_update(&hash_ctx, tmp, n)) { in lws_jwk_rfc7638_fingerprint() 833 lws_genhash_destroy(&hash_ctx, NULL); in lws_jwk_rfc7638_fingerprint() 839 if (lws_genhash_destroy(&hash_ctx, digest32)) in lws_jwk_rfc7638_fingerprint()
|
/external/rust/crates/quiche/deps/boringssl/src/crypto/curve25519/ |
D | curve25519.c | 1899 SHA512_CTX hash_ctx; in ED25519_sign() local 1900 SHA512_Init(&hash_ctx); in ED25519_sign() 1901 SHA512_Update(&hash_ctx, az + 32, 32); in ED25519_sign() 1902 SHA512_Update(&hash_ctx, message, message_len); in ED25519_sign() 1904 SHA512_Final(nonce, &hash_ctx); in ED25519_sign() 1911 SHA512_Init(&hash_ctx); in ED25519_sign() 1912 SHA512_Update(&hash_ctx, out_sig, 32); in ED25519_sign() 1913 SHA512_Update(&hash_ctx, private_key + 32, 32); in ED25519_sign() 1914 SHA512_Update(&hash_ctx, message, message_len); in ED25519_sign() 1916 SHA512_Final(hram, &hash_ctx); in ED25519_sign() [all …]
|
/external/boringssl/src/crypto/curve25519/ |
D | curve25519.c | 1899 SHA512_CTX hash_ctx; in ED25519_sign() local 1900 SHA512_Init(&hash_ctx); in ED25519_sign() 1901 SHA512_Update(&hash_ctx, az + 32, 32); in ED25519_sign() 1902 SHA512_Update(&hash_ctx, message, message_len); in ED25519_sign() 1904 SHA512_Final(nonce, &hash_ctx); in ED25519_sign() 1911 SHA512_Init(&hash_ctx); in ED25519_sign() 1912 SHA512_Update(&hash_ctx, out_sig, 32); in ED25519_sign() 1913 SHA512_Update(&hash_ctx, private_key + 32, 32); in ED25519_sign() 1914 SHA512_Update(&hash_ctx, message, message_len); in ED25519_sign() 1916 SHA512_Final(hram, &hash_ctx); in ED25519_sign() [all …]
|
/external/libwebsockets/plugins/ssh-base/ |
D | sshd.c | 1214 if (lws_genhash_init(&pss->ua->hash_ctx, in lws_ssh_parse_plaintext() 1221 if (lws_genhash_update(&pss->ua->hash_ctx, ps, pp - ps)) { in lws_ssh_parse_plaintext() 1226 lws_genhash_destroy(&pss->ua->hash_ctx, hash); in lws_ssh_parse_plaintext() 1277 pss->ua->hash_ctx.type)) { in lws_ssh_parse_plaintext() 1279 lws_genhash_size(pss->ua->hash_ctx.type)); in lws_ssh_parse_plaintext()
|
/external/libwebsockets/plugins/ssh-base/include/ |
D | lws-ssh.h | 378 struct lws_genhash_ctx hash_ctx; member
|