Home
last modified time | relevance | path

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

12345678910>>...22

/external/webrtc/webrtc/base/
Dmessagedigest.cc40 MessageDigest* digest = new OpenSSLDigest(alg); in Create() local
41 if (digest->Size() == 0) { // invalid algorithm in Create()
42 delete digest; in Create()
43 digest = NULL; in Create()
45 return digest; in Create()
47 MessageDigest* digest = NULL; in Create()
49 digest = new Md5Digest(); in Create()
51 digest = new Sha1Digest(); in Create()
53 return digest; in Create()
70 size_t ComputeDigest(MessageDigest* digest, const void* input, size_t in_len, in ComputeDigest() argument
[all …]
/external/curl/lib/vauth/
Ddigest.c338 unsigned char digest[MD5_DIGEST_LEN]; in Curl_auth_create_digest_md5_message() local
398 Curl_MD5_final(ctxt, digest); in Curl_auth_create_digest_md5_message()
404 Curl_MD5_update(ctxt, (const unsigned char *) digest, MD5_DIGEST_LEN); in Curl_auth_create_digest_md5_message()
411 Curl_MD5_final(ctxt, digest); in Curl_auth_create_digest_md5_message()
415 snprintf(&HA1_hex[2 * i], 3, "%02x", digest[i]); in Curl_auth_create_digest_md5_message()
435 Curl_MD5_final(ctxt, digest); in Curl_auth_create_digest_md5_message()
438 snprintf(&HA2_hex[2 * i], 3, "%02x", digest[i]); in Curl_auth_create_digest_md5_message()
465 Curl_MD5_final(ctxt, digest); in Curl_auth_create_digest_md5_message()
468 snprintf(&resp_hash_hex[2 * i], 3, "%02x", digest[i]); in Curl_auth_create_digest_md5_message()
502 struct digestdata *digest) in Curl_auth_decode_digest_http_message() argument
[all …]
Dcram.c100 unsigned char digest[MD5_DIGEST_LEN]; in Curl_auth_create_cram_md5_message() local
119 Curl_HMAC_final(ctxt, digest); in Curl_auth_create_cram_md5_message()
124 userp, digest[0], digest[1], digest[2], digest[3], digest[4], in Curl_auth_create_cram_md5_message()
125 digest[5], digest[6], digest[7], digest[8], digest[9], digest[10], in Curl_auth_create_cram_md5_message()
126 digest[11], digest[12], digest[13], digest[14], digest[15]); in Curl_auth_create_cram_md5_message()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/macs/
DHMac.java24 private Digest digest; field in HMac
65 Digest digest) in getByteLength() argument
67 if (digest instanceof ExtendedDigest) in getByteLength()
69 return ((ExtendedDigest)digest).getByteLength(); in getByteLength()
72 Integer b = (Integer)blockLengths.get(digest.getAlgorithmName()); in getByteLength()
76 … throw new IllegalArgumentException("unknown digest passed: " + digest.getAlgorithmName()); in getByteLength()
89 Digest digest) in HMac() argument
91 this(digest, getByteLength(digest)); in HMac()
95 Digest digest, in HMac() argument
98 this.digest = digest; in HMac()
[all …]
/external/vboot_reference/tests/
Dvb2_sha_tests.c19 uint8_t *digest, in vb2_digest() argument
33 return vb2_digest_finalize(&dc, digest, digest_size); in vb2_digest()
38 uint8_t digest[VB2_SHA1_DIGEST_SIZE]; in sha1_tests() local
49 VB2_HASH_SHA1, digest, sizeof(digest)), in sha1_tests()
51 TEST_EQ(memcmp(digest, sha1_results[i], sizeof(digest)), in sha1_tests()
56 VB2_HASH_SHA1, digest, sizeof(digest) - 1), in sha1_tests()
62 uint8_t digest[VB2_SHA256_DIGEST_SIZE]; in sha256_tests() local
73 VB2_HASH_SHA256, digest, sizeof(digest)), in sha256_tests()
75 TEST_EQ(memcmp(digest, sha256_results[i], sizeof(digest)), in sha256_tests()
80 VB2_HASH_SHA256, digest, sizeof(digest) - 1), in sha256_tests()
[all …]
/external/selinux/libselinux/src/
Dlabel_support.c116 void hidden 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 hidden 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.c96 struct selabel_digest *digest) in selabel_subs_init() argument
151 if (digest_add_specfile(digest, cfg, NULL, sb.st_size, path) < 0) in selabel_subs_init()
169 struct selabel_digest *digest = NULL; in selabel_is_digest_set() local
174 digest = calloc(1, sizeof(*digest)); in selabel_is_digest_set()
175 if (!digest) in selabel_is_digest_set()
178 digest->digest = calloc(1, DIGEST_SPECFILE_SIZE + 1); in selabel_is_digest_set()
179 if (!digest->digest) in selabel_is_digest_set()
182 digest->specfile_list = calloc(DIGEST_FILES_MAX, in selabel_is_digest_set()
184 if (!digest->specfile_list) in selabel_is_digest_set()
187 entry = digest; in selabel_is_digest_set()
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/
DRSA.java208 String digest, in addDigestSignature() argument
212 String mainName = digest + "WITHRSA"; in addDigestSignature()
213 String jdk11Variation1 = digest + "withRSA"; in addDigestSignature()
214 String jdk11Variation2 = digest + "WithRSA"; in addDigestSignature()
215 String alias = digest + "/" + "RSA"; in addDigestSignature()
216 String longName = digest + "WITHRSAENCRYPTION"; in addDigestSignature()
217 String longJdk11Variation1 = digest + "withRSAEncryption"; in addDigestSignature()
218 String longJdk11Variation2 = digest + "WithRSAEncryption"; in addDigestSignature()
237 String digest, in addISO9796Signature() argument
240 …provider.addAlgorithm("Alg.Alias.Signature." + digest + "withRSA/ISO9796-2", digest + "WITHRSA/ISO… in addISO9796Signature()
[all …]
/external/syslinux/gpxe/src/crypto/
Dhmac.c40 static void hmac_reduce_key ( struct digest_algorithm *digest, in hmac_reduce_key() argument
42 uint8_t digest_ctx[digest->ctxsize]; in hmac_reduce_key()
44 digest_init ( digest, digest_ctx ); in hmac_reduce_key()
45 digest_update ( digest, digest_ctx, key, *key_len ); in hmac_reduce_key()
46 digest_final ( digest, digest_ctx, key ); in hmac_reduce_key()
47 *key_len = digest->digestsize; in hmac_reduce_key()
63 void hmac_init ( struct digest_algorithm *digest, void *digest_ctx, in hmac_init() argument
65 unsigned char k_ipad[digest->blocksize]; in hmac_init()
70 hmac_reduce_key ( digest, key, key_len ); in hmac_init()
80 digest_init ( digest, digest_ctx ); in hmac_init()
[all …]
Dchap.c47 struct digest_algorithm *digest ) { in chap_init() argument
51 assert ( chap->digest == NULL ); in chap_init()
55 DBG ( "CHAP %p initialising with %s digest\n", chap, digest->name ); in chap_init()
57 state_len = ( digest->ctxsize + digest->digestsize ); in chap_init()
65 chap->digest = digest; in chap_init()
67 chap->response = ( state + digest->ctxsize ); in chap_init()
68 chap->response_len = digest->digestsize; in chap_init()
69 digest_init ( chap->digest, chap->digest_context ); in chap_init()
82 assert ( chap->digest != NULL ); in chap_update()
85 if ( ! chap->digest ) in chap_update()
[all …]
/external/openssh/
Ddigest-libc.c148 const struct ssh_digest *digest = ssh_digest_by_alg(alg); in ssh_digest_alg_name() local
150 return digest == NULL ? NULL : digest->name; in ssh_digest_alg_name()
156 const struct ssh_digest *digest = ssh_digest_by_alg(alg); in ssh_digest_bytes() local
158 return digest == NULL ? 0 : digest->digest_len; in ssh_digest_bytes()
164 const struct ssh_digest *digest = ssh_digest_by_alg(ctx->alg); in ssh_digest_blocksize() local
166 return digest == NULL ? 0 : digest->block_len; in ssh_digest_blocksize()
172 const struct ssh_digest *digest = ssh_digest_by_alg(alg); in ssh_digest_start() local
175 if (digest == NULL || (ret = calloc(1, sizeof(*ret))) == NULL) in ssh_digest_start()
177 if ((ret->mdctx = calloc(1, digest->ctx_len)) == NULL) { in ssh_digest_start()
182 digest->md_init(ret->mdctx); in ssh_digest_start()
[all …]
Ddigest-openssl.c94 const struct ssh_digest *digest = ssh_digest_by_alg(alg); in ssh_digest_alg_name() local
96 return digest == NULL ? NULL : digest->name; in ssh_digest_alg_name()
102 const struct ssh_digest *digest = ssh_digest_by_alg(alg); in ssh_digest_bytes() local
104 return digest == NULL ? 0 : digest->digest_len; in ssh_digest_bytes()
116 const struct ssh_digest *digest = ssh_digest_by_alg(alg); in ssh_digest_start() local
119 if (digest == NULL || ((ret = calloc(1, sizeof(*ret))) == NULL)) in ssh_digest_start()
123 if (EVP_DigestInit_ex(&ret->mdctx, digest->mdfunc(), NULL) != 1) { in ssh_digest_start()
158 const struct ssh_digest *digest = ssh_digest_by_alg(ctx->alg); in ssh_digest_final() local
163 if (dlen < digest->digest_len) /* No truncation allowed */ in ssh_digest_final()
167 if (l != digest->digest_len) /* sanity */ in ssh_digest_final()
[all …]
/external/ltp/testcases/kernel/security/integrity/ima/src/
Dima_measure.c50 u_int8_t digest[SHA_DIGEST_LENGTH]; member
55 u_int8_t digest[SHA_DIGEST_LENGTH]; member
61 static void display_sha1_digest(u_int8_t * digest) in display_sha1_digest() argument
66 print_info(" %02X", (*(digest + i) & 0xff)); in display_sha1_digest()
72 static void calc_digest(u_int8_t * digest, int len, void *data) in calc_digest() argument
77 memset(digest, 0, sizeof *digest); in calc_digest()
80 SHA1_Final(digest, &c); in calc_digest()
87 rc = memcmp(fox, template->header.digest, sizeof fox); in verify_template_hash()
89 u_int8_t digest[SHA_DIGEST_LENGTH]; in verify_template_hash() local
91 memset(digest, 0, sizeof digest); in verify_template_hash()
[all …]
/external/libchrome/base/
Dmd5_unittest.cc17 MD5Digest digest; in TEST() local
27 digest.a[i] = data[i] & 0xff; in TEST()
29 std::string actual = MD5DigestToBase16(digest); in TEST()
36 MD5Digest digest; in TEST() local
39 MD5Sum(data, strlen(data), &digest); in TEST()
49 EXPECT_EQ(expected[i], digest.a[i] & 0xFF); in TEST()
53 MD5Digest digest; in TEST() local
56 MD5Sum(data, strlen(data), &digest); in TEST()
66 EXPECT_EQ(expected[i], digest.a[i] & 0xFF); in TEST()
76 MD5Digest digest; in TEST() local
[all …]
/external/boringssl/src/crypto/digest/
Ddigest.c93 if (ctx->digest && ctx->digest->ctx_size && ctx->md_data) { in EVP_MD_CTX_cleanup()
94 OPENSSL_cleanse(ctx->md_data, ctx->digest->ctx_size); in EVP_MD_CTX_cleanup()
120 if (in == NULL || in->digest == NULL) { in EVP_MD_CTX_copy_ex()
125 if (out->digest == in->digest) { in EVP_MD_CTX_copy_ex()
135 out->digest = in->digest; in EVP_MD_CTX_copy_ex()
136 if (in->md_data && in->digest->ctx_size) { in EVP_MD_CTX_copy_ex()
140 out->md_data = OPENSSL_malloc(in->digest->ctx_size); in EVP_MD_CTX_copy_ex()
146 OPENSSL_memcpy(out->md_data, in->md_data, in->digest->ctx_size); in EVP_MD_CTX_copy_ex()
168 if (ctx->digest != type) { in EVP_DigestInit_ex()
169 if (ctx->digest && ctx->digest->ctx_size > 0) { in EVP_DigestInit_ex()
[all …]
/external/pdfium/core/fdrm/crypto/
Dfx_crypt_unittest.cpp17 std::string CRYPT_ToBase16(const uint8_t* digest) { in CRYPT_ToBase16() argument
22 uint8_t a = digest[i]; in CRYPT_ToBase16()
30 uint8_t digest[16]; in CRYPT_MD5String() local
31 CRYPT_MD5Generate(reinterpret_cast<const uint8_t*>(str), strlen(str), digest); in CRYPT_MD5String()
32 return CRYPT_ToBase16(digest); in CRYPT_MD5String()
48 uint8_t digest[16]; in TEST() local
52 CRYPT_MD5Generate(reinterpret_cast<const uint8_t*>(data), length, digest); in TEST()
58 EXPECT_EQ(expected[i], digest[i]); in TEST()
62 uint8_t digest[16]; in TEST() local
66 CRYPT_MD5Generate(reinterpret_cast<const uint8_t*>(data), length, digest); in TEST()
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/digest/
DBCMessageDigest.java1 package org.bouncycastle.jcajce.provider.digest;
10 protected Digest digest; field in BCMessageDigest
13 Digest digest) in BCMessageDigest() argument
15 super(digest.getAlgorithmName()); in BCMessageDigest()
17 this.digest = digest; in BCMessageDigest()
22 digest.reset(); in engineReset()
28 digest.update(input); in engineUpdate()
36 digest.update(input, offset, len); in engineUpdate()
41 byte[] digestBytes = new byte[digest.getDigestSize()]; in engineDigest()
43 digest.doFinal(digestBytes, 0); in engineDigest()
/external/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()
/external/mmc-utils/3rdparty/hmac_sha/
Dsha2.c331 void sha256(const unsigned char *message, unsigned int len, unsigned char *digest) in sha256() argument
337 sha256_final(&ctx, digest); in sha256()
392 void sha256_final(sha256_ctx *ctx, unsigned char *digest) in sha256_final() argument
416 UNPACK32(ctx->h[i], &digest[i << 2]); in sha256_final()
419 UNPACK32(ctx->h[0], &digest[ 0]); in sha256_final()
420 UNPACK32(ctx->h[1], &digest[ 4]); in sha256_final()
421 UNPACK32(ctx->h[2], &digest[ 8]); in sha256_final()
422 UNPACK32(ctx->h[3], &digest[12]); in sha256_final()
423 UNPACK32(ctx->h[4], &digest[16]); in sha256_final()
424 UNPACK32(ctx->h[5], &digest[20]); in sha256_final()
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/generators/
DPKCS5S1ParametersGenerator.java21 private Digest digest; field in PKCS5S1ParametersGenerator
29 Digest digest) in PKCS5S1ParametersGenerator() argument
31 this.digest = digest; in PKCS5S1ParametersGenerator()
39 byte[] digestBytes = new byte[digest.getDigestSize()]; in generateDerivedKey()
41 digest.update(password, 0, password.length); in generateDerivedKey()
42 digest.update(salt, 0, salt.length); in generateDerivedKey()
44 digest.doFinal(digestBytes, 0); in generateDerivedKey()
47 digest.update(digestBytes, 0, digestBytes.length); in generateDerivedKey()
48 digest.doFinal(digestBytes, 0); in generateDerivedKey()
67 if (keySize > digest.getDigestSize()) in generateDerivedParameters()
[all …]
/external/curl/lib/
Dhttp_digest.c51 struct digestdata *digest; in Curl_input_digest() local
54 digest = &data->state.proxydigest; in Curl_input_digest()
57 digest = &data->state.digest; in Curl_input_digest()
67 return Curl_auth_decode_digest_http_message(header, digest); in Curl_input_digest()
92 struct digestdata *digest; in Curl_output_digest() local
96 digest = &data->state.proxydigest; in Curl_output_digest()
103 digest = &data->state.digest; in Curl_output_digest()
120 have_chlg = digest->input_token ? TRUE : FALSE; in Curl_output_digest()
122 have_chlg = digest->nonce ? TRUE : FALSE; in Curl_output_digest()
155 path, digest, &response, &len); in Curl_output_digest()
[all …]
/external/chromium-trace/catapult/telemetry/third_party/web-page-replay/third_party/dns/rdtypes/
Ddsbase.py37 digest):
42 self.digest = digest
47 dns.rdata._hexify(self.digest,
62 digest = ''.join(chunks)
63 digest = digest.decode('hex_codec')
65 digest)
73 file.write(self.digest)
79 digest = wire[current : current + rdlen]
80 return cls(rdclass, rdtype, header[0], header[1], header[2], digest)
91 v = cmp(self.digest, other.digest)
/external/curl/src/
Dtool_metalink.c136 static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx) in MD5_Final()
138 md5_digest(ctx, 16, digest); in MD5_Final()
154 static void SHA1_Final(unsigned char digest[20], SHA_CTX *ctx) in SHA1_Final()
156 sha1_digest(ctx, 20, digest); in SHA1_Final()
172 static void SHA256_Final(unsigned char digest[32], SHA256_CTX *ctx) in SHA256_Final()
174 sha256_digest(ctx, 32, digest); in SHA256_Final()
192 static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx) in MD5_Final()
194 memcpy(digest, gcry_md_read(*ctx, 0), 16); in MD5_Final()
211 static void SHA1_Final(unsigned char digest[20], SHA_CTX *ctx) in SHA1_Final()
213 memcpy(digest, gcry_md_read(*ctx, 0), 20); in SHA1_Final()
[all …]
/external/pdfium/core/fpdfapi/parser/
Dcpdf_security_handler.cpp58 uint8_t digest[16]; in CalcEncryptKey() local
59 CRYPT_MD5Finish(&md5, digest); in CalcEncryptKey()
61 if (copy_len > sizeof(digest)) { in CalcEncryptKey()
62 copy_len = sizeof(digest); in CalcEncryptKey()
66 CRYPT_MD5Generate(digest, copy_len, digest); in CalcEncryptKey()
70 FXSYS_memcpy(key, digest, copy_len); in CalcEncryptKey()
244 uint8_t digest[32]; in Revision6_Hash() local
245 CRYPT_SHA256Finish(&sha, digest); in Revision6_Hash()
248 uint8_t* input = digest; in Revision6_Hash()
327 uint8_t digest[32]; in AES256_CheckPassword() local
[all …]
/external/vboot_reference/host/lib/
Dhost_signature.c80 uint8_t* digest = NULL; in CalculateHash() local
85 digest = DigestBuf(data, size, key->algorithm); in CalculateHash()
86 if (!digest) in CalculateHash()
92 free(digest); in CalculateHash()
97 Memcpy(GetSignatureData(sig), digest, digest_size); in CalculateHash()
98 free(digest); in CalculateHash()
107 uint8_t* digest; in CalculateSignature() local
121 digest = DigestBuf(data, size, hash_type_map[key->algorithm]); in CalculateSignature()
122 if (!digest) in CalculateSignature()
128 VbExFree(digest); in CalculateSignature()
[all …]

12345678910>>...22