Home
last modified time | relevance | path

Searched refs:digest (Results 26 - 50 of 555) sorted by relevance

12345678910>>...23

/third_party/python/Lib/test/
H A Dtest_hmac.py43 self, h, digest, hashname, digest_size, block_size
45 self.assertEqual(h.hexdigest().upper(), digest.upper())
46 self.assertEqual(h.digest(), binascii.unhexlify(digest))
52 self, key, data, digest, hashfunc, hashname, digest_size, block_size
56 h, digest, hashname, digest_size, block_size
61 h, digest, hashname, digest_size, block_size
68 self.assertEqual(h.hexdigest().upper(), digest.upper())
72 h, digest, hashname, digest_size, block_size
77 self.assertEqual(h.hexdigest().upper(), digest
351 def digest(self): global() member in TestVectorsTestCase.test_legacy_block_size_warnings.MockCrazyHash
[all...]
/third_party/libwebsockets/lib/misc/
H A Dsha-1.c260 unsigned char *digest; in sha1_result() local
262 digest = (unsigned char *)digest0; in sha1_result()
265 memcpy(digest, &ctxt->h.b8[0], 20); in sha1_result()
267 digest[0] = ctxt->h.b8[3]; digest[1] = ctxt->h.b8[2]; in sha1_result()
268 digest[2] = ctxt->h.b8[1]; digest[3] = ctxt->h.b8[0]; in sha1_result()
269 digest[4] = ctxt->h.b8[7]; digest[5] = ctxt->h.b8[6]; in sha1_result()
270 digest[ in sha1_result()
[all...]
/third_party/python/Modules/
H A D_hashopenssl.c133 /* blake2 digest */
230 EVP_MD_CTX *ctx; /* OpenSSL message digest context */
323 PY_EVP_MD *digest = NULL; in py_digest_by_name() local
337 digest = entry->evp; in py_digest_by_name()
343 digest = entry->evp_nosecurity; in py_digest_by_name()
346 if (digest != NULL) { in py_digest_by_name()
347 PY_EVP_MD_up_ref(digest); in py_digest_by_name()
355 digest = PY_EVP_MD_fetch(name, NULL); in py_digest_by_name()
358 digest = PY_EVP_MD_fetch(name, "-fips"); in py_digest_by_name()
362 if (digest in py_digest_by_name()
508 unsigned char digest[EVP_MAX_MD_SIZE]; EVP_digest_impl() local
543 unsigned char digest[EVP_MAX_MD_SIZE]; EVP_hexdigest_impl() local
762 unsigned char *digest; EVPXOF_hexdigest_impl() local
861 PY_EVP_MD *digest = NULL; py_evp_fromname() local
1222 PY_EVP_MD *digest = py_digest_by_name(module, hash_name, Py_ht_pbkdf2); pbkdf2_hmac_impl() local
1433 _hashlib_hmac_singleshot_impl(PyObject *module, Py_buffer *key, Py_buffer *msg, PyObject *digest) _hashlib_hmac_singleshot_impl() argument
1496 PY_EVP_MD *digest; _hashlib_hmac_new_impl() local
1713 unsigned char digest[EVP_MAX_MD_SIZE]; _hashlib_HMAC_digest_impl() local
1738 unsigned char digest[EVP_MAX_MD_SIZE]; _hashlib_HMAC_hexdigest_impl() local
[all...]
/third_party/node/test/parallel/
H A Dtest-crypto-hmac.js26 () => crypto.createHmac('sha256', 'key').digest({
59 const actual = hmac.digest('hex');
273 .digest('hex');
410 crypto.createHmac('sha256', 'w00t').digest('ucs2'),
411 crypto.createHmac('sha256', 'w00t').digest().toString('ucs2'));
413 // Check initialized -> uninitialized state transition after calling digest().
420 assert.deepStrictEqual(h.digest('buffer'), Buffer.from(expected, 'latin1'));
421 assert.deepStrictEqual(h.digest('buffer'), Buffer.from(''));
425 assert.strictEqual(h.digest('latin1'), expected);
426 assert.strictEqual(h.digest('latin
[all...]
/third_party/fsverity-utils/programs/
H A Dcmd_sign.c43 /* Sign a file for fs-verity by computing its digest, then signing it. */
50 struct libfsverity_digest *digest = NULL; in fsverity_cmd_sign() local
123 &tree_params, &digest) != 0) { in fsverity_cmd_sign()
124 error_msg("failed to compute digest"); in fsverity_cmd_sign()
128 if (libfsverity_sign_digest(digest, &sig_params, in fsverity_cmd_sign()
130 error_msg("failed to sign digest"); in fsverity_cmd_sign()
137 ASSERT(digest->digest_size <= FS_VERITY_MAX_DIGEST_SIZE); in fsverity_cmd_sign()
138 bin2hex(digest->digest, digest in fsverity_cmd_sign()
[all...]
/third_party/ltp/testcases/kernel/security/integrity/ima/src/
H A Dima_boot_aggregate.c42 u_int8_t digest[SHA_DIGEST_LENGTH]; member
49 unsigned char digest[SHA_DIGEST_LENGTH]; member
74 memset(&pcr[i].digest, 0, SHA_DIGEST_LENGTH); in do_test()
80 /* Extend the pseudo PCRs with the event digest */ in do_test()
84 display_sha1_digest(event.header.digest); in do_test()
89 SHA1_Update(&c, pcr[event.header.pcr].digest, in do_test()
91 SHA1_Update(&c, event.header.digest, in do_test()
93 SHA1_Final(pcr[event.header.pcr].digest, &c); in do_test()
108 /* Extend the boot aggregate with the pseudo PCR digest values */ in do_test()
114 display_sha1_digest(pcr[i].digest); in do_test()
[all...]
/third_party/mbedtls/programs/aes/
H A Dcrypt_and_hash.c70 unsigned char digest[MBEDTLS_MD_MAX_SIZE]; in main() local
260 if (mbedtls_md_finish(&md_ctx, digest) != 0) { in main()
265 memcpy(IV, digest, 16); in main()
279 memset(digest, 0, 32); in main()
280 memcpy(digest, IV, 16); in main()
288 if (mbedtls_md_update(&md_ctx, digest, 32) != 0) { in main()
298 if (mbedtls_md_finish(&md_ctx, digest) != 0) { in main()
307 digest, in main()
322 if (mbedtls_md_hmac_starts(&md_ctx, digest, 32) != 0) { in main()
372 if (mbedtls_md_hmac_finish(&md_ctx, digest) ! in main()
[all...]
/third_party/node/deps/openssl/openssl/providers/implementations/macs/
H A Dhmac_prov.c51 PROV_DIGEST digest; member
96 ossl_prov_digest_reset(&macctx->digest); in hmac_free()
118 memset(&dst->digest, 0, sizeof(dst->digest)); in hmac_dup()
121 || !ossl_prov_digest_copy(&dst->digest, &src->digest)) { in hmac_dup()
144 const EVP_MD *md = ossl_prov_digest_md(&macctx->digest); in hmac_block_size()
154 const EVP_MD *digest; in hmac_setkey() local
165 digest = ossl_prov_digest_md(&macctx->digest); in hmac_setkey()
[all...]
/third_party/openssl/providers/implementations/macs/
H A Dhmac_prov.c51 PROV_DIGEST digest; member
96 ossl_prov_digest_reset(&macctx->digest); in hmac_free()
118 memset(&dst->digest, 0, sizeof(dst->digest)); in hmac_dup()
121 || !ossl_prov_digest_copy(&dst->digest, &src->digest)) { in hmac_dup()
144 const EVP_MD *md = ossl_prov_digest_md(&macctx->digest); in hmac_block_size()
154 const EVP_MD *digest; in hmac_setkey() local
165 digest = ossl_prov_digest_md(&macctx->digest); in hmac_setkey()
[all...]
/third_party/openssl/demos/digest/
H A DEVP_MD_xof.c52 unsigned char *digest = NULL; in main() local
54 /* Allow digest length to be changed for demonstration purposes. */ in main()
58 fprintf(stderr, "Specify a non-negative digest length\n"); in main()
78 fprintf(stderr, "Failed to create digest context\n"); in main()
82 /* Initialize digest context. */ in main()
84 fprintf(stderr, "Failed to initialize digest\n"); in main()
89 * Feed our message into the digest function. in main()
97 /* Allocate enough memory for our digest length. */ in main()
98 digest = OPENSSL_malloc(digest_len); in main()
99 if (digest in main()
[all...]
/third_party/node/deps/npm/node_modules/@sigstore/core/dist/
H A Dcrypto.js6 exports.bufferEqual = exports.verify = exports.hash = exports.digest = exports.createPublicKey = void 0;
33 function digest(algorithm, ...data) { function
38 return hash.digest();
40 exports.digest = digest;
41 // TODO: deprecate this in favor of digest()
47 return hash.digest();
/third_party/openssl/ohos_lite/include/crypto/
H A Dsm2.h24 const EVP_MD *digest,
33 const EVP_MD *digest,
39 const EVP_MD *digest,
60 int sm2_ciphertext_size(const EC_KEY *key, const EVP_MD *digest, size_t msg_len,
66 const EVP_MD *digest,
72 const EVP_MD *digest,
/third_party/node/src/crypto/
H A Dcrypto_hash.cc65 SetProtoMethod(isolate, t, "digest", HashDigest); in Initialize()
173 // causes hash.digest() to correctly return an empty buffer / string. in HashDigest()
179 // and Hash.digest can both be used to retrieve the digest, in HashDigest()
183 ByteSource::Builder digest(len); in HashDigest()
189 hash->mdctx_.get(), digest.data<unsigned char>(), &len); in HashDigest()
194 hash->mdctx_.get(), digest.data<unsigned char>(), len); in HashDigest()
200 hash->digest_ = std::move(digest).release(); in HashDigest()
217 digest(other.digest),
333 unsigned char digest[EVP_MAX_MD_SIZE]; InternalVerifyIntegrity() local
[all...]
H A Dcrypto_hkdf.cc23 digest(other.digest),
59 params->digest = EVP_get_digestbyname(*hash); in AdditionalConfig()
60 if (params->digest == nullptr) { in AdditionalConfig()
61 THROW_ERR_CRYPTO_INVALID_DIGEST(env, "Invalid digest: %s", *hash); in AdditionalConfig()
94 size_t max_length = EVP_MD_size(params->digest) * kMaxDigestMultiplier; in AdditionalConfig()
110 !EVP_PKEY_CTX_set_hkdf_md(ctx.get(), params.digest) || in DeriveBits()
125 salt = {default_salt, static_cast<unsigned>(EVP_MD_size(params.digest))}; in DeriveBits()
134 params.digest, in DeriveBits()
/third_party/node/deps/openssl/openssl/include/crypto/
H A Dsm2.h29 const EVP_MD *digest,
38 const EVP_MD *digest,
44 const EVP_MD *digest,
67 int ossl_sm2_ciphertext_size(const EC_KEY *key, const EVP_MD *digest,
74 const EVP_MD *digest,
79 const EVP_MD *digest,
/third_party/openssl/include/crypto/
H A Dsm2.h29 const EVP_MD *digest,
38 const EVP_MD *digest,
44 const EVP_MD *digest,
67 int ossl_sm2_ciphertext_size(const EC_KEY *key, const EVP_MD *digest,
74 const EVP_MD *digest,
79 const EVP_MD *digest,
/third_party/skia/third_party/externals/brotli/java/org/brotli/wrapper/common/
H A DBrotliCommon.java42 public static boolean checkDictionaryDataMd5(byte[] digest) { in checkDictionaryDataMd5() argument
43 return Arrays.equals(RFC_DICTIONARY_MD5, digest); in checkDictionaryDataMd5()
49 public static boolean checkDictionaryDataSha1(byte[] digest) { in checkDictionaryDataSha1() argument
50 return Arrays.equals(RFC_DICTIONARY_SHA_1, digest); in checkDictionaryDataSha1()
56 public static boolean checkDictionaryDataSha256(byte[] digest) { in checkDictionaryDataSha256() argument
57 return Arrays.equals(RFC_DICTIONARY_SHA_256, digest); in checkDictionaryDataSha256()
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/crypto/
H A Dsha1-pbkdf2.c16 u8 *digest) in pbkdf2_sha1_f()
43 os_memcpy(digest, tmp, SHA1_MAC_LEN); in pbkdf2_sha1_f()
51 digest[j] ^= tmp2[j]; in pbkdf2_sha1_f()
78 unsigned char digest[SHA1_MAC_LEN]; in pbkdf2_sha1() local
83 count, digest)) in pbkdf2_sha1()
86 os_memcpy(pos, digest, plen); in pbkdf2_sha1()
14 pbkdf2_sha1_f(const char *passphrase, const u8 *ssid, size_t ssid_len, int iterations, unsigned int count, u8 *digest) pbkdf2_sha1_f() argument
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/crypto/
H A Dsha1-pbkdf2.c16 u8 *digest) in pbkdf2_sha1_f()
43 os_memcpy(digest, tmp, SHA1_MAC_LEN); in pbkdf2_sha1_f()
51 digest[j] ^= tmp2[j]; in pbkdf2_sha1_f()
78 unsigned char digest[SHA1_MAC_LEN]; in pbkdf2_sha1() local
83 count, digest)) in pbkdf2_sha1()
86 os_memcpy(pos, digest, plen); in pbkdf2_sha1()
14 pbkdf2_sha1_f(const char *passphrase, const u8 *ssid, size_t ssid_len, int iterations, unsigned int count, u8 *digest) pbkdf2_sha1_f() argument
/third_party/node/deps/openssl/openssl/providers/implementations/kdfs/
H A Dsshkdf.c43 PROV_DIGEST digest; member
82 ossl_prov_digest_reset(&ctx->digest); in kdf_sshkdf_reset()
108 md = ossl_prov_digest_md(&ctx->digest); in kdf_sshkdf_derive()
144 if (!ossl_prov_digest_load_from_params(&ctx->digest, params, provctx)) in kdf_sshkdf_set_ctx_params()
234 unsigned char digest[EVP_MAX_MD_SIZE]; in SSHKDF() local
258 if (!EVP_DigestFinal_ex(md, digest, &dsize)) in SSHKDF()
262 memcpy(okey, digest, okey_len); in SSHKDF()
267 memcpy(okey, digest, dsize); in SSHKDF()
283 if (!EVP_DigestFinal_ex(md, digest, &dsize)) in SSHKDF()
287 memcpy(okey + cursize, digest, okey_le in SSHKDF()
[all...]
/third_party/openssl/providers/implementations/kdfs/
H A Dsshkdf.c43 PROV_DIGEST digest; member
82 ossl_prov_digest_reset(&ctx->digest); in kdf_sshkdf_reset()
108 md = ossl_prov_digest_md(&ctx->digest); in kdf_sshkdf_derive()
144 if (!ossl_prov_digest_load_from_params(&ctx->digest, params, provctx)) in kdf_sshkdf_set_ctx_params()
234 unsigned char digest[EVP_MAX_MD_SIZE]; in SSHKDF() local
258 if (!EVP_DigestFinal_ex(md, digest, &dsize)) in SSHKDF()
262 memcpy(okey, digest, okey_len); in SSHKDF()
267 memcpy(okey, digest, dsize); in SSHKDF()
283 if (!EVP_DigestFinal_ex(md, digest, &dsize)) in SSHKDF()
287 memcpy(okey + cursize, digest, okey_le in SSHKDF()
[all...]
/third_party/python/Modules/_sha3/
H A Dsha3module.c33 #define SHA3_done(state, digest) sha3_final(digest, state)
215 _sha3.sha3_224.digest
217 Return the digest value as a bytes object.
224 unsigned char digest[SHA3_MAX_DIGESTSIZE + SHA3_LANESIZE]; in _sha3_sha3_224_digest_impl() local
231 res = SHA3_done(&temp, digest); in _sha3_sha3_224_digest_impl()
236 return PyBytes_FromStringAndSize((const char *)digest, in _sha3_sha3_224_digest_impl()
244 Return the digest value as a string of hexadecimal digits.
251 unsigned char digest[SHA3_MAX_DIGESTSIZE + SHA3_LANESIZE]; in _sha3_sha3_224_hexdigest_impl() local
255 /* Get the raw (binary) digest valu in _sha3_sha3_224_hexdigest_impl()
456 unsigned char *digest = NULL; _SHAKE_digest() local
[all...]
/third_party/node/deps/openssl/openssl/apps/
H A Dts.c39 static int query_command(const char *data, const char *digest,
42 static TS_REQ *create_query(BIO *data_bio, const char *digest, const EVP_MD *md,
44 static int create_digest(BIO *input, const char *digest,
64 static int verify_command(const char *data, const char *digest, const char *queryfile,
69 static TS_VERIFY_CTX *create_verify_ctx(const char *data, const char *digest,
107 {"", OPT_MD, '-', "Any supported digest"},
112 {"digest", OPT_DIGEST, 's', "Digest (as a hex string)"},
138 " [-digest hexstring] [-tspolicy oid] [-no_nonce] [-cert]",
153 " -untrusted extra-certs.pem [-data file] [-digest hexstring]",
167 char *data = NULL, *digest in ts_main() local
394 query_command(const char *data, const char *digest, const EVP_MD *md, const char *policy, int no_nonce, int cert, const char *in, const char *out, int text) query_command() argument
441 create_query(BIO *data_bio, const char *digest, const EVP_MD *md, const char *policy, int no_nonce, int cert) create_query() argument
505 create_digest(BIO *input, const char *digest, const EVP_MD *md, unsigned char **md_value) create_digest() argument
846 verify_command(const char *data, const char *digest, const char *queryfile, const char *in, int token_in, const char *CApath, const char *CAfile, const char *CAstore, char *untrusted, X509_VERIFY_PARAM *vpm) verify_command() argument
893 create_verify_ctx(const char *data, const char *digest, const char *queryfile, const char *CApath, const char *CAfile, const char *CAstore, char *untrusted, X509_VERIFY_PARAM *vpm) create_verify_ctx() argument
[all...]
/third_party/openssl/apps/
H A Dts.c39 static int query_command(const char *data, const char *digest,
42 static TS_REQ *create_query(BIO *data_bio, const char *digest, const EVP_MD *md,
44 static int create_digest(BIO *input, const char *digest,
64 static int verify_command(const char *data, const char *digest, const char *queryfile,
69 static TS_VERIFY_CTX *create_verify_ctx(const char *data, const char *digest,
107 {"", OPT_MD, '-', "Any supported digest"},
112 {"digest", OPT_DIGEST, 's', "Digest (as a hex string)"},
138 " [-digest hexstring] [-tspolicy oid] [-no_nonce] [-cert]",
153 " -untrusted extra-certs.pem [-data file] [-digest hexstring]",
167 char *data = NULL, *digest in ts_main() local
394 query_command(const char *data, const char *digest, const EVP_MD *md, const char *policy, int no_nonce, int cert, const char *in, const char *out, int text) query_command() argument
441 create_query(BIO *data_bio, const char *digest, const EVP_MD *md, const char *policy, int no_nonce, int cert) create_query() argument
505 create_digest(BIO *input, const char *digest, const EVP_MD *md, unsigned char **md_value) create_digest() argument
846 verify_command(const char *data, const char *digest, const char *queryfile, const char *in, int token_in, const char *CApath, const char *CAfile, const char *CAstore, char *untrusted, X509_VERIFY_PARAM *vpm) verify_command() argument
893 create_verify_ctx(const char *data, const char *digest, const char *queryfile, const char *CApath, const char *CAfile, const char *CAstore, char *untrusted, X509_VERIFY_PARAM *vpm) create_verify_ctx() argument
[all...]
/third_party/node/lib/internal/crypto/
H A Dhash.js93 this.push(this[kHandle].digest());
117 Hash.prototype.digest = function digest(outputEncoding) {
124 const ret = this[kHandle].digest(`${outputEncoding}`);
148 Hmac.prototype.digest = function digest(outputEncoding) {
158 const ret = this[kHandle].digest(`${outputEncoding}`);
166 // Implementation for WebCrypto subtle.digest()

Completed in 13 milliseconds

12345678910>>...23