Home
last modified time | relevance | path

Searched refs:hash_ctx (Results 1 – 16 of 16) sorted by relevance

/external/fsverity-utils/lib/
Dlib_private.h34 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 …]
Dhash_algs.c21 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 …]
Dcompute_digest.c29 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/
Dutils.c391 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/
Djws.c452 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/
Djws.c411 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/
Djwe.c213 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/
Dutils.py40 hash_ctx = hashes.Hash(algorithm, backend)
41 hash_ctx.update(data)
42 data = hash_ctx.finalize()
/external/boringssl/src/crypto/hrss/
Dhrss.c1955 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/
Dhrss.c1955 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/
Dmbedtls-server.c476 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/
Djwk.c819 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/
Dcurve25519.c1899 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/
Dcurve25519.c1899 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/
Dsshd.c1214 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/
Dlws-ssh.h378 struct lws_genhash_ctx hash_ctx; member