Home
last modified time | relevance | path

Searched refs:digest (Results 1 – 25 of 688) sorted by relevance

12345678910>>...28

/third_party/python/Modules/
Dsha512module.c46 SHA_INT64 digest[8]; /* Message digest */ member
74 memcpy(dest->digest, src->digest, sizeof(src->digest)); in SHAcopy()
132 S[i] = sha_info->digest[i]; in sha512_transform()
227 sha_info->digest[i] = sha_info->digest[i] + S[i]; in sha512_transform()
239 sha_info->digest[0] = Py_ULL(0x6a09e667f3bcc908); in sha512_init()
240 sha_info->digest[1] = Py_ULL(0xbb67ae8584caa73b); in sha512_init()
241 sha_info->digest[2] = Py_ULL(0x3c6ef372fe94f82b); in sha512_init()
242 sha_info->digest[3] = Py_ULL(0xa54ff53a5f1d36f1); in sha512_init()
243 sha_info->digest[4] = Py_ULL(0x510e527fade682d1); in sha512_init()
244 sha_info->digest[5] = Py_ULL(0x9b05688c2b3e6c1f); in sha512_init()
[all …]
Dsha256module.c45 SHA_INT32 digest[8]; /* Message digest */ member
73 memcpy(dest->digest, src->digest, sizeof(src->digest)); in SHAcopy()
131 S[i] = sha_info->digest[i]; in sha_transform()
210 sha_info->digest[i] = sha_info->digest[i] + S[i]; in sha_transform()
222 sha_info->digest[0] = 0x6A09E667L; in sha_init()
223 sha_info->digest[1] = 0xBB67AE85L; in sha_init()
224 sha_info->digest[2] = 0x3C6EF372L; in sha_init()
225 sha_info->digest[3] = 0xA54FF53AL; in sha_init()
226 sha_info->digest[4] = 0x510E527FL; in sha_init()
227 sha_info->digest[5] = 0x9B05688CL; in sha_init()
[all …]
/third_party/node/test/parallel/
Dtest-crypto-hash.js13 let digest; variable
16 const a1 = crypto.createHash('sha1').update('Test123').digest('hex');
17 const a2 = crypto.createHash('sha256').update('Test123').digest('base64');
18 const a3 = crypto.createHash('sha512').update('Test123').digest(); // buffer
19 const a4 = crypto.createHash('sha1').update('Test123').digest('buffer');
44 digest = 'latin1';
45 const a0 = crypto.createHash(cryptoType).update('Test123').digest(digest);
49 `${cryptoType} with ${digest} digest failed to evaluate to expected hash`
53 digest = 'hex';
57 `${cryptoType} with ${digest} digest failed to evaluate to expected hash`);
[all …]
/third_party/curl/lib/vauth/
Ddigest.c343 unsigned char digest[MD5_DIGEST_LEN]; in Curl_auth_create_digest_md5_message() local
400 Curl_MD5_final(ctxt, digest); in Curl_auth_create_digest_md5_message()
406 Curl_MD5_update(ctxt, (const unsigned char *) digest, MD5_DIGEST_LEN); in Curl_auth_create_digest_md5_message()
413 Curl_MD5_final(ctxt, digest); in Curl_auth_create_digest_md5_message()
417 msnprintf(&HA1_hex[2 * i], 3, "%02x", digest[i]); in Curl_auth_create_digest_md5_message()
437 Curl_MD5_final(ctxt, digest); in Curl_auth_create_digest_md5_message()
440 msnprintf(&HA2_hex[2 * i], 3, "%02x", digest[i]); in Curl_auth_create_digest_md5_message()
467 Curl_MD5_final(ctxt, digest); in Curl_auth_create_digest_md5_message()
470 msnprintf(&resp_hash_hex[2 * i], 3, "%02x", digest[i]); in Curl_auth_create_digest_md5_message()
501 struct digestdata *digest) in Curl_auth_decode_digest_http_message() argument
[all …]
Dcram.c64 unsigned char digest[MD5_DIGEST_LEN]; in Curl_auth_create_cram_md5_message() local
80 Curl_HMAC_final(ctxt, digest); in Curl_auth_create_cram_md5_message()
85 userp, digest[0], digest[1], digest[2], digest[3], digest[4], in Curl_auth_create_cram_md5_message()
86 digest[5], digest[6], digest[7], digest[8], digest[9], digest[10], in Curl_auth_create_cram_md5_message()
87 digest[11], digest[12], digest[13], digest[14], digest[15]); in Curl_auth_create_cram_md5_message()
Ddigest_sspi.c319 struct digestdata *digest) in Curl_auth_decode_digest_http_message() argument
325 if(digest->input_token) { in Curl_auth_decode_digest_http_message()
354 Curl_auth_digest_cleanup(digest); in Curl_auth_decode_digest_http_message()
360 digest->input_token = (BYTE *) Curl_memdup(chlg, chlglen + 1); in Curl_auth_decode_digest_http_message()
361 if(!digest->input_token) in Curl_auth_decode_digest_http_message()
364 digest->input_token_len = chlglen; in Curl_auth_decode_digest_http_message()
394 struct digestdata *digest, in Curl_auth_create_digest_http_message() argument
430 if((userp && !digest->user) || (!userp && digest->user) || in Curl_auth_create_digest_http_message()
431 (passwdp && !digest->passwd) || (!passwdp && digest->passwd) || in Curl_auth_create_digest_http_message()
432 (userp && digest->user && strcmp(userp, digest->user)) || in Curl_auth_create_digest_http_message()
[all …]
/third_party/selinux/libselinux/src/
Dlabel_support.c116 void digest_gen_hash(struct selabel_digest *digest) in digest_gen_hash() argument
121 if (!digest) in digest_gen_hash()
125 Sha1Update(&context, digest->hashbuf, digest->hashbuf_size); in digest_gen_hash()
126 Sha1Finalise(&context, (SHA1_HASH *)digest->digest); in digest_gen_hash()
127 free(digest->hashbuf); in digest_gen_hash()
128 digest->hashbuf = NULL; in digest_gen_hash()
144 int digest_add_specfile(struct selabel_digest *digest, FILE *fp, in digest_add_specfile() argument
151 if (!digest) in digest_add_specfile()
154 if (digest->hashbuf_size + buf_len < digest->hashbuf_size) { in digest_add_specfile()
158 digest->hashbuf_size += buf_len; in digest_add_specfile()
[all …]
Dlabel.c62 struct selabel_digest *digest = NULL; in selabel_is_digest_set() local
67 digest = calloc(1, sizeof(*digest)); in selabel_is_digest_set()
68 if (!digest) in selabel_is_digest_set()
71 digest->digest = calloc(1, DIGEST_SPECFILE_SIZE + 1); in selabel_is_digest_set()
72 if (!digest->digest) in selabel_is_digest_set()
75 digest->specfile_list = calloc(DIGEST_FILES_MAX, in selabel_is_digest_set()
77 if (!digest->specfile_list) in selabel_is_digest_set()
80 entry = digest; in selabel_is_digest_set()
87 if (digest) { in selabel_is_digest_set()
88 free(digest->digest); in selabel_is_digest_set()
[all …]
/third_party/openssl/crypto/evp/
Ddigest.c28 if (ctx->digest && ctx->digest->cleanup in EVP_MD_CTX_reset()
30 ctx->digest->cleanup(ctx); in EVP_MD_CTX_reset()
31 if (ctx->digest && ctx->digest->ctx_size && ctx->md_data in EVP_MD_CTX_reset()
33 OPENSSL_clear_free(ctx->md_data, ctx->digest->ctx_size); in EVP_MD_CTX_reset()
76 if (ctx->engine && ctx->digest && in EVP_DigestInit_ex()
77 (type == NULL || (type->type == ctx->digest->type))) in EVP_DigestInit_ex()
114 if (!ctx->digest) { in EVP_DigestInit_ex()
118 type = ctx->digest; in EVP_DigestInit_ex()
121 if (ctx->digest != type) { in EVP_DigestInit_ex()
122 if (ctx->digest && ctx->digest->ctx_size) { in EVP_DigestInit_ex()
[all …]
/third_party/ffmpeg/libavformat/
Dhttpauth.c43 DigestParams *digest = &state->digest_params; in handle_digest_params() local
49 *dest = digest->nonce; in handle_digest_params()
50 *dest_len = sizeof(digest->nonce); in handle_digest_params()
52 *dest = digest->opaque; in handle_digest_params()
53 *dest_len = sizeof(digest->opaque); in handle_digest_params()
55 *dest = digest->algorithm; in handle_digest_params()
56 *dest_len = sizeof(digest->algorithm); in handle_digest_params()
58 *dest = digest->qop; in handle_digest_params()
59 *dest_len = sizeof(digest->qop); in handle_digest_params()
61 *dest = digest->stale; in handle_digest_params()
[all …]
/third_party/node/lib/internal/crypto/
Dpbkdf2.js18 function pbkdf2(password, salt, iterations, keylen, digest, callback) { argument
19 if (typeof digest === 'function') {
20 callback = digest;
21 digest = undefined;
24 ({ password, salt, iterations, keylen, digest } =
25 check(password, salt, iterations, keylen, digest));
40 handleError(_pbkdf2(keybuf, password, salt, iterations, digest, wrap),
41 digest);
44 function pbkdf2Sync(password, salt, iterations, keylen, digest) { argument
45 ({ password, salt, iterations, keylen, digest } =
[all …]
/third_party/ltp/testcases/kernel/security/integrity/ima/tests/
Dima_measurements.sh54 local digest
56 digest="$(${algorithm}sum $file 2>/dev/null | cut -f1 -d ' ')"
57 if [ -n "$digest" ]; then
58 echo "$digest"
62 digest="$(openssl $algorithm $file 2>/dev/null | cut -f2 -d ' ')"
63 if [ -n "$digest" ]; then
64 echo "$digest"
75 digest="$(rdigest --$arg $file 2>/dev/null | cut -f1 -d ' ')"
76 if [ -n "$digest" ]; then
77 echo "$digest"
[all …]
/third_party/boringssl/src/decrepit/ripemd/
Dripemd_test.cc69 uint8_t digest[RIPEMD160_DIGEST_LENGTH]; in TEST() local
73 digest); in TEST()
89 RIPEMD160_Final(digest, &ctx); in TEST()
92 if (OPENSSL_memcmp(digest, test.expected, sizeof(digest)) != 0) { in TEST()
95 hexdump(stderr, "", digest, sizeof(digest)); in TEST()
104 uint8_t digest[RIPEMD160_DIGEST_LENGTH]; in TEST() local
105 RIPEMD160(buf.get(), kLargeBufSize, digest); in TEST()
111 if (OPENSSL_memcmp(digest, kMillionADigest, sizeof(digest)) != 0) { in TEST()
113 hexdump(stderr, "", digest, sizeof(digest)); in TEST()
/third_party/lwip/src/include/netif/ppp/
Dchap-new.h104 #define CHAP_MDTYPE_D(digest) \ argument
105 ((digest) == CHAP_MICROSOFT_V2)? MDTYPE_MICROSOFT_V2: \
106 ((digest) == CHAP_MICROSOFT)? MDTYPE_MICROSOFT: \
107 ((digest) == CHAP_MD5)? MDTYPE_MD5: \
110 #define CHAP_MDTYPE_D(digest) \
111 ((digest) == CHAP_MD5)? MDTYPE_MD5: \
117 #define CHAP_CANDIGEST(mdtype, digest) \ argument
118 ((digest) == CHAP_MICROSOFT_V2)? (mdtype) & MDTYPE_MICROSOFT_V2: \
119 ((digest) == CHAP_MICROSOFT)? (mdtype) & MDTYPE_MICROSOFT: \
120 ((digest) == CHAP_MD5)? (mdtype) & MDTYPE_MD5: \
[all …]
/third_party/python/Lib/
Dhmac.py87 key = self._digest_cons(key).digest()
134 h.update(self._inner.digest())
137 def digest(self): member in HMAC
145 return h.digest()
173 def digest(key, msg, digest): function
183 isinstance(digest, str) and digest in _openssl_md_meths):
184 return _hashopenssl.hmac_digest(key, msg, digest)
186 if callable(digest):
187 digest_cons = digest
188 elif isinstance(digest, str):
[all …]
/third_party/skia/src/core/
DSkScalerCache.cpp38 auto [digest, size] = this->digest(packedGlyphID); in glyph()
39 return {fGlyphForIndex[digest.index()], size}; in glyph()
42 std::tuple<SkGlyphDigest, size_t> SkScalerCache::digest(SkPackedGlyphID packedGlyphID) { in digest() function in SkScalerCache
43 SkGlyphDigest* digest = fDigestForPackedGlyphID.find(packedGlyphID); in digest() local
45 if (digest != nullptr) { in digest()
46 return {*digest, 0}; in digest()
55 SkGlyphDigest digest = SkGlyphDigest{index, *glyph}; in addGlyph()
56 fDigestForPackedGlyphID.set(glyph->getPackedID(), digest); in addGlyph()
58 return digest; in addGlyph()
112 SkGlyphDigest* digest = fDigestForPackedGlyphID.find(toID); in mergeGlyphAndImage() local
[all …]
/third_party/boringssl/src/crypto/fipsmodule/digest/
Ddigest.c128 if (in == NULL || (in->pctx == NULL && in->digest == NULL)) { in EVP_MD_CTX_copy_ex()
144 if (in->digest != NULL) { in EVP_MD_CTX_copy_ex()
145 if (out->digest != in->digest) { in EVP_MD_CTX_copy_ex()
146 assert(in->digest->ctx_size != 0); in EVP_MD_CTX_copy_ex()
147 tmp_buf = OPENSSL_malloc(in->digest->ctx_size); in EVP_MD_CTX_copy_ex()
166 out->digest = in->digest; in EVP_MD_CTX_copy_ex()
168 if (in->digest != NULL) { in EVP_MD_CTX_copy_ex()
169 OPENSSL_memcpy(out->md_data, in->md_data, in->digest->ctx_size); in EVP_MD_CTX_copy_ex()
190 if (ctx->digest != type) { in EVP_DigestInit_ex()
200 ctx->digest = type; in EVP_DigestInit_ex()
[all …]
/third_party/curl/lib/
Dhttp_digest.c50 struct digestdata *digest; in Curl_input_digest() local
53 digest = &data->state.proxydigest; in Curl_input_digest()
56 digest = &data->state.digest; in Curl_input_digest()
66 return Curl_auth_decode_digest_http_message(header, digest); in Curl_input_digest()
90 struct digestdata *digest; in Curl_output_digest() local
97 digest = &data->state.proxydigest; in Curl_output_digest()
105 digest = &data->state.digest; in Curl_output_digest()
122 have_chlg = digest->input_token ? TRUE : FALSE; in Curl_output_digest()
124 have_chlg = digest->nonce ? TRUE : FALSE; in Curl_output_digest()
160 path, digest, &response, &len); in Curl_output_digest()
[all …]
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/crypto/
Dfips_prf_wolfssl.c22 sha.digest[0] = state[0]; in sha1_transform()
23 sha.digest[1] = state[1]; in sha1_transform()
24 sha.digest[2] = state[2]; in sha1_transform()
25 sha.digest[3] = state[3]; in sha1_transform()
26 sha.digest[4] = state[4]; in sha1_transform()
28 state[0] = sha.digest[0]; in sha1_transform()
29 state[1] = sha.digest[1]; in sha1_transform()
30 state[2] = sha.digest[2]; in sha1_transform()
31 state[3] = sha.digest[3]; in sha1_transform()
32 state[4] = sha.digest[4]; in sha1_transform()
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/crypto/
Dfips_prf_wolfssl.c22 sha.digest[0] = state[0]; in sha1_transform()
23 sha.digest[1] = state[1]; in sha1_transform()
24 sha.digest[2] = state[2]; in sha1_transform()
25 sha.digest[3] = state[3]; in sha1_transform()
26 sha.digest[4] = state[4]; in sha1_transform()
28 state[0] = sha.digest[0]; in sha1_transform()
29 state[1] = sha.digest[1]; in sha1_transform()
30 state[2] = sha.digest[2]; in sha1_transform()
31 state[3] = sha.digest[3]; in sha1_transform()
32 state[4] = sha.digest[4]; in sha1_transform()
/third_party/python/Lib/test/
Dtest_hmac.py36 self, key, data, digest, hashfunc, hashname, digest_size, block_size argument
39 self.assertEqual(h.hexdigest().upper(), digest.upper())
40 self.assertEqual(h.digest(), binascii.unhexlify(digest))
46 self.assertEqual(h.hexdigest().upper(), digest.upper())
47 self.assertEqual(h.digest(), binascii.unhexlify(digest))
56 self.assertEqual(h.hexdigest().upper(), digest.upper())
59 self.assertEqual(h.hexdigest().upper(), digest.upper())
60 self.assertEqual(h.digest(), binascii.unhexlify(digest))
67 self.assertEqual(h.hexdigest().upper(), digest.upper())
71 self.assertEqual(h.hexdigest().upper(), digest.upper())
[all …]
/third_party/mbedtls/programs/aes/
Dcrypt_and_hash.c123 unsigned char digest[MBEDTLS_MD_MAX_SIZE]; in main() local
314 mbedtls_md_finish( &md_ctx, digest ); in main()
316 memcpy( IV, digest, 16 ); in main()
331 memset( digest, 0, 32 ); in main()
332 memcpy( digest, IV, 16 ); in main()
337 mbedtls_md_update( &md_ctx, digest, 32 ); in main()
339 mbedtls_md_finish( &md_ctx, digest ); in main()
343 if( mbedtls_cipher_setkey( &cipher_ctx, digest, cipher_info->key_bitlen, in main()
360 mbedtls_md_hmac_starts( &md_ctx, digest, 32 ); in main()
407 mbedtls_md_hmac_finish( &md_ctx, digest ); in main()
[all …]
/third_party/boringssl/src/ssl/
Dtls13_enc.cc80 static bool hkdf_expand_label(Span<uint8_t> out, const EVP_MD *digest, in hkdf_expand_label() argument
103 return HKDF_expand(out.data(), out.size(), digest, secret.data(), in hkdf_expand_label()
152 const EVP_MD *digest = ssl_session_get_digest(session); in tls13_set_traffic_key() local
158 if (!hkdf_expand_label(key, digest, traffic_secret, label_to_span("key"), in tls13_set_traffic_key()
167 if (!hkdf_expand_label(iv, digest, traffic_secret, label_to_span("iv"), in tls13_set_traffic_key()
340 const EVP_MD *digest = ssl_session_get_digest(SSL_get_session(ssl)); in tls13_rotate_traffic_key() local
341 return hkdf_expand_label(secret, digest, secret, in tls13_rotate_traffic_key()
367 const EVP_MD *digest, uint16_t version, in tls13_verify_data() argument
371 auto key = MakeSpan(key_buf, EVP_MD_size(digest)); in tls13_verify_data()
373 if (!hkdf_expand_label(key, digest, secret, in tls13_verify_data()
[all …]
/third_party/ltp/testcases/kernel/security/integrity/ima/src/
Dima_boot_aggregate.c57 u_int8_t digest[SHA_DIGEST_LENGTH]; in main() member
63 unsigned char digest[SHA_DIGEST_LENGTH]; in main() member
82 memset(&pcr[i].digest, 0, SHA_DIGEST_LENGTH); in main()
94 display_sha1_digest(event.header.digest); in main()
99 SHA1_Update(&c, pcr[event.header.pcr].digest, in main()
101 SHA1_Update(&c, event.header.digest, in main()
103 SHA1_Final(pcr[event.header.pcr].digest, &c); in main()
123 display_sha1_digest(pcr[i].digest); in main()
125 SHA1_Update(&c, pcr[i].digest, SHA_DIGEST_LENGTH); in main()
/third_party/boringssl/src/crypto/hkdf/
Dhkdf.c26 int HKDF(uint8_t *out_key, size_t out_len, const EVP_MD *digest, in HKDF() argument
33 if (!HKDF_extract(prk, &prk_len, digest, secret, secret_len, salt, in HKDF()
35 !HKDF_expand(out_key, out_len, digest, prk, prk_len, info, info_len)) { in HKDF()
42 int HKDF_extract(uint8_t *out_key, size_t *out_len, const EVP_MD *digest, in HKDF_extract() argument
50 if (HMAC(digest, salt, salt_len, secret, secret_len, out_key, &len) == NULL) { in HKDF_extract()
55 assert(*out_len == EVP_MD_size(digest)); in HKDF_extract()
59 int HKDF_expand(uint8_t *out_key, size_t out_len, const EVP_MD *digest, in HKDF_expand() argument
63 const size_t digest_len = EVP_MD_size(digest); in HKDF_expand()
78 if (!HMAC_Init_ex(&hmac, prk, prk_len, digest, NULL)) { in HKDF_expand()

12345678910>>...28