Home
last modified time | relevance | path

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

123456

/external/bouncycastle/src/main/java/org/bouncycastle/crypto/macs/
DHMac.java22 private Digest digest; field in HMac
55 Digest digest) in getByteLength() argument
57 if (digest instanceof ExtendedDigest) in getByteLength()
59 return ((ExtendedDigest)digest).getByteLength(); in getByteLength()
62 Integer b = (Integer)blockLengths.get(digest.getAlgorithmName()); in getByteLength()
66 … throw new IllegalArgumentException("unknown digest passed: " + digest.getAlgorithmName()); in getByteLength()
79 Digest digest) in HMac() argument
81 this(digest, getByteLength(digest)); in HMac()
85 Digest digest, in HMac() argument
88 this.digest = digest; in HMac()
[all …]
/external/bouncycastle/src/main/java/org/bouncycastle/jce/provider/
DJDKMessageDigest.java11 Digest digest; field in JDKMessageDigest
14 Digest digest) in JDKMessageDigest() argument
16 super(digest.getAlgorithmName()); in JDKMessageDigest()
18 this.digest = digest; in JDKMessageDigest()
23 digest.reset(); in engineReset()
29 digest.update(input); in engineUpdate()
37 digest.update(input, offset, len); in engineUpdate()
42 byte[] digestBytes = new byte[digest.getDigestSize()]; in engineDigest()
44 digest.doFinal(digestBytes, 0); in engineDigest()
65 d.digest = new SHA1Digest((SHA1Digest)digest); in clone()
[all …]
DJDKDigestSignature.java50 private Digest digest; field in JDKDigestSignature
56 Digest digest, in JDKDigestSignature() argument
59 this.digest = digest; in JDKDigestSignature()
67 Digest digest, in JDKDigestSignature() argument
70 this.digest = digest; in JDKDigestSignature()
86 digest.reset(); in engineInitVerify()
101 digest.reset(); in engineInitSign()
121 digest.update(b); in engineUpdate()
130 digest.update(b, off, len); in engineUpdate()
136 byte[] hash = new byte[digest.getDigestSize()]; in engineSign()
[all …]
DJCESecretKeyFactory.java111 private int digest; field in JCESecretKeyFactory.PBEKeyFactory
120 int digest, in PBEKeyFactory() argument
128 this.digest = digest; in PBEKeyFactory()
144 … return new JCEPBEKey(this.algName, this.algOid, scheme, digest, keySize, ivSize, pbeSpec, null); in engineGenerateSecret()
149 param = Util.makePBEParameters(pbeSpec, scheme, digest, keySize, ivSize); in engineGenerateSecret()
153 param = Util.makePBEMacParameters(pbeSpec, scheme, digest, keySize); in engineGenerateSecret()
156 … return new JCEPBEKey(this.algName, this.algOid, scheme, digest, keySize, ivSize, pbeSpec, param); in engineGenerateSecret()
168 private int digest; field in JCESecretKeyFactory.DESPBEKeyFactory
177 int digest, in DESPBEKeyFactory() argument
185 this.digest = digest; in DESPBEKeyFactory()
[all …]
DJDKDSASigner.java42 private Digest digest; field in JDKDSASigner
47 Digest digest, in JDKDSASigner() argument
50 this.digest = digest; in JDKDSASigner()
96 digest.reset(); in engineInitVerify()
133 digest.reset(); in engineInitSign()
141 digest.update(b); in engineUpdate()
150 digest.update(b, off, len); in engineUpdate()
156 byte[] hash = new byte[digest.getDigestSize()]; in engineSign()
158 digest.doFinal(hash, 0); in engineSign()
176 byte[] hash = new byte[digest.getDigestSize()]; in engineVerify()
[all …]
/external/openssl/crypto/evp/
Ddigest.c149 if (ctx->engine && ctx->digest && (!type || in EVP_DigestInit_ex()
150 (type && (type->type == ctx->digest->type)))) in EVP_DigestInit_ex()
192 if(!ctx->digest) in EVP_DigestInit_ex()
198 if (ctx->digest != type) in EVP_DigestInit_ex()
200 if (ctx->digest && ctx->digest->ctx_size) in EVP_DigestInit_ex()
202 ctx->digest=type; in EVP_DigestInit_ex()
228 return ctx->digest->init(ctx); in EVP_DigestInit_ex()
250 OPENSSL_assert(ctx->digest->md_size <= EVP_MAX_MD_SIZE); in EVP_DigestFinal_ex()
251 ret=ctx->digest->final(ctx,md); in EVP_DigestFinal_ex()
253 *size=ctx->digest->md_size; in EVP_DigestFinal_ex()
[all …]
Dbio_ok.c418 *ppmd=ctx->md.digest; in ok_ctrl()
466 if(ctx->buf_len+ 2* md->digest->md_size > OK_BLOCK_SIZE) return; in sig_out()
468 EVP_DigestInit_ex(md, md->digest, NULL); in sig_out()
472 RAND_pseudo_bytes(md->md_data, md->digest->md_size); in sig_out()
473 memcpy(&(ctx->buf[ctx->buf_len]), md->md_data, md->digest->md_size); in sig_out()
474 longswap(&(ctx->buf[ctx->buf_len]), md->digest->md_size); in sig_out()
475 ctx->buf_len+= md->digest->md_size; in sig_out()
479 ctx->buf_len+= md->digest->md_size; in sig_out()
494 if((int)(ctx->buf_len-ctx->buf_off) < 2*md->digest->md_size) return; in sig_in()
496 EVP_DigestInit_ex(md, md->digest, NULL); in sig_in()
[all …]
Dp_verify.c78 if (ctx->digest->flags & EVP_MD_FLAG_PKEY_METHOD_SIGNATURE) in EVP_VerifyFinal()
87 if (EVP_PKEY_CTX_set_signature_md(pkctx, ctx->digest) <= 0) in EVP_VerifyFinal()
97 v=ctx->digest->required_pkey_type[i]; in EVP_VerifyFinal()
110 if (ctx->digest->verify == NULL) in EVP_VerifyFinal()
116 return(ctx->digest->verify(ctx->digest->type,m,m_len, in EVP_VerifyFinal()
Dp_sign.c92 if (ctx->digest->flags & EVP_MD_FLAG_PKEY_METHOD_SIGNATURE) in EVP_SignFinal()
102 if (EVP_PKEY_CTX_set_signature_md(pkctx, ctx->digest) <= 0) in EVP_SignFinal()
115 v=ctx->digest->required_pkey_type[i]; in EVP_SignFinal()
129 if (ctx->digest->sign == NULL) in EVP_SignFinal()
134 return(ctx->digest->sign(ctx->digest->type,m,m_len,sigret,siglen, in EVP_SignFinal()
/external/bouncycastle/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 …]
DPKCS12ParametersGenerator.java24 private Digest digest; field in PKCS12ParametersGenerator
37 Digest digest) in PKCS12ParametersGenerator() argument
39 this.digest = digest; in PKCS12ParametersGenerator()
40 if (digest instanceof ExtendedDigest) in PKCS12ParametersGenerator()
42 u = digest.getDigestSize(); in PKCS12ParametersGenerator()
43 v = ((ExtendedDigest)digest).getByteLength(); in PKCS12ParametersGenerator()
47 … throw new IllegalArgumentException("Digest " + digest.getAlgorithmName() + " unsupported"); in PKCS12ParametersGenerator()
133 digest.update(D, 0, D.length); in generateDerivedKey()
134 digest.update(I, 0, I.length); in generateDerivedKey()
135 digest.doFinal(A, 0); in generateDerivedKey()
[all …]
DOpenSSLPBEParametersGenerator.java20 private Digest digest = new MD5Digest(); field in OpenSSLPBEParametersGenerator
48 byte[] buf = new byte[digest.getDigestSize()]; in generateDerivedKey()
54 digest.update(password, 0, password.length); in generateDerivedKey()
55 digest.update(salt, 0, salt.length); in generateDerivedKey()
57 digest.doFinal(buf, 0); in generateDerivedKey()
71 digest.reset(); in generateDerivedKey()
72 digest.update(buf, 0, buf.length); in generateDerivedKey()
/external/chromium/net/http/
Dhttp_auth_handler_digest_unittest.cc106 scoped_refptr<HttpAuthHandlerDigest> digest = new HttpAuthHandlerDigest; in TEST() local
107 bool ok = digest->ParseChallenge(challenge.begin(), challenge.end()); in TEST()
110 EXPECT_STREQ(tests[i].parsed_realm, digest->realm_.c_str()); in TEST()
111 EXPECT_STREQ(tests[i].parsed_nonce, digest->nonce_.c_str()); in TEST()
112 EXPECT_STREQ(tests[i].parsed_domain, digest->domain_.c_str()); in TEST()
113 EXPECT_STREQ(tests[i].parsed_opaque, digest->opaque_.c_str()); in TEST()
114 EXPECT_EQ(tests[i].parsed_stale, digest->stale_); in TEST()
115 EXPECT_EQ(tests[i].parsed_algorithm, digest->algorithm_); in TEST()
116 EXPECT_EQ(tests[i].parsed_qop, digest->qop_); in TEST()
253 scoped_refptr<HttpAuthHandlerDigest> digest = new HttpAuthHandlerDigest; in TEST() local
[all …]
/external/chromium/base/
Dhmac_unittest.cc69 const char *digest; in TEST() member
127 unsigned char digest[kDigestSize]; in TEST() local
128 EXPECT_TRUE(hmac.Sign(data_string, digest, kDigestSize)); in TEST()
129 EXPECT_EQ(memcmp(cases[i].digest, digest, kDigestSize), 0); in TEST()
145 const char *digest; in TEST() member
160 unsigned char digest[kDigestSize]; in TEST() local
161 EXPECT_TRUE(hmac.Sign(data_string, digest, kDigestSize)); in TEST()
162 EXPECT_EQ(memcmp(cases[i].digest, digest, kDigestSize), 0); in TEST()
/external/bouncycastle/src/main/java/org/bouncycastle/crypto/signers/
DRSADigestSigner.java29 private final Digest digest; field in RSADigestSigner
57 Digest digest) in RSADigestSigner() argument
59 this.digest = digest; in RSADigestSigner()
61 …algId = new AlgorithmIdentifier((DERObjectIdentifier)oidMap.get(digest.getAlgorithmName()), DERNul… in RSADigestSigner()
69 return digest.getAlgorithmName() + "withRSA"; in getAlgorithmName()
117 digest.update(input); in update()
128 digest.update(input, inOff, length); in update()
143 byte[] hash = new byte[digest.getDigestSize()]; in generateSignature()
144 digest.doFinal(hash, 0); in generateSignature()
162 byte[] hash = new byte[digest.getDigestSize()]; in verifySignature()
[all …]
/external/ppp/pppd/
Dchap-new.h77 #define CHAP_MDTYPE_D(digest) \ argument
78 ((digest) == CHAP_MICROSOFT_V2)? MDTYPE_MICROSOFT_V2: \
79 ((digest) == CHAP_MICROSOFT)? MDTYPE_MICROSOFT: \
80 ((digest) == CHAP_MD5)? MDTYPE_MD5: \
84 #define CHAP_CANDIGEST(mdtype, digest) \ argument
85 ((digest) == CHAP_MICROSOFT_V2)? (mdtype) & MDTYPE_MICROSOFT_V2: \
86 ((digest) == CHAP_MICROSOFT)? (mdtype) & MDTYPE_MICROSOFT: \
87 ((digest) == CHAP_MD5)? (mdtype) & MDTYPE_MD5: \
116 struct chap_digest_type *digest,
Dchap-new.c53 struct chap_digest_type *digest,
83 struct chap_digest_type *digest; member
98 struct chap_digest_type *digest; member
123 struct chap_digest_type *digest,
215 ss->digest = dp; in chap_auth_peer()
245 cs->digest = dp; in chap_auth_with_peer()
291 ss->digest->generate_challenge(p); in chap_generate_challenge()
353 ok = (*verifier)(name, ss->name, id, ss->digest, in chap_handle_response()
380 auth_peer_success(0, PPP_CHAP, ss->digest->code, in chap_handle_response()
398 struct chap_digest_type *digest, in chap_verify_response() argument
[all …]
/external/bouncycastle/src/main/java/org/bouncycastle/crypto/io/
DDigestOutputStream.java12 protected Digest digest; field in DigestOutputStream
16 Digest digest) in DigestOutputStream() argument
19 this.digest = digest; in DigestOutputStream()
25 digest.update((byte)b); in write()
35 digest.update(b, off, len); in write()
41 return digest; in getDigest()
DDigestInputStream.java12 protected Digest digest; field in DigestInputStream
16 Digest digest) in DigestInputStream() argument
19 this.digest = digest; in DigestInputStream()
29 digest.update((byte)b); in read()
43 digest.update(b, off, n); in read()
50 return digest; in getDigest()
/external/dropbear/libtomcrypt/src/mac/hmac/
Dhmac_test.c42 unsigned char digest[MAXBLOCKSIZE]; in hmac_test()
52 unsigned char digest[MAXBLOCKSIZE]; in hmac_test()
272 outlen = sizeof(digest); in hmac_test()
273 …ry(hash, cases[i].key, cases[i].keylen, cases[i].data, cases[i].datalen, digest, &outlen)) != CRYP… in hmac_test()
280 if(XMEMCMP(digest, cases[i].digest, (size_t)hash_descriptor[hash].hashsize) != 0) { in hmac_test()
287 printf("%2x ", digest[j]); in hmac_test()
291 printf("%2x ", cases[i].digest[j]); in hmac_test()
/external/dbus/dbus/
Ddbus-sha.c170 SHATransform(dbus_uint32_t *digest, dbus_uint32_t *data) in SHATransform() argument
176 A = digest[0]; in SHATransform()
177 B = digest[1]; in SHATransform()
178 C = digest[2]; in SHATransform()
179 D = digest[3]; in SHATransform()
180 E = digest[4]; in SHATransform()
269 digest[0] += A; in SHATransform()
270 digest[1] += B; in SHATransform()
271 digest[2] += C; in SHATransform()
272 digest[3] += D; in SHATransform()
[all …]
/external/openssl/crypto/rsa/
Drsa_sign.c79 ASN1_OCTET_STRING digest; in RSA_sign() local
110 sig.digest= &digest; in RSA_sign()
111 sig.digest->data=(unsigned char *)m; /* TMP UGLY CAST */ in RSA_sign()
112 sig.digest->length=m_len; in RSA_sign()
244 if (md && (EVP_MD_size(md) != sig->digest->length)) in int_rsa_verify()
249 memcpy(rm, sig->digest->data, in int_rsa_verify()
250 sig->digest->length); in int_rsa_verify()
251 *prm_len = sig->digest->length; in int_rsa_verify()
255 else if (((unsigned int)sig->digest->length != m_len) || in int_rsa_verify()
256 (memcmp(m,sig->digest->data,m_len) != 0)) in int_rsa_verify()
/external/bouncycastle/src/main/java/org/bouncycastle/asn1/x509/
DDigestInfo.java25 private byte[] digest; field in DigestInfo
52 byte[] digest) in DigestInfo() argument
54 this.digest = digest; in DigestInfo()
64 digest = ASN1OctetString.getInstance(e.nextElement()).getOctets(); in DigestInfo()
74 return digest; in getDigest()
82 v.add(new DEROctetString(digest)); in toASN1Object()
DAuthorityKeyIdentifier.java108 Digest digest = new SHA1Digest(); in AuthorityKeyIdentifier() local
109 byte[] resBuf = new byte[digest.getDigestSize()]; in AuthorityKeyIdentifier()
112 digest.update(bytes, 0, bytes.length); in AuthorityKeyIdentifier()
113 digest.doFinal(resBuf, 0); in AuthorityKeyIdentifier()
126 Digest digest = new SHA1Digest(); in AuthorityKeyIdentifier() local
127 byte[] resBuf = new byte[digest.getDigestSize()]; in AuthorityKeyIdentifier()
130 digest.update(bytes, 0, bytes.length); in AuthorityKeyIdentifier()
131 digest.doFinal(resBuf, 0); in AuthorityKeyIdentifier()
/external/grub/stage2/
Dmd5.c215 unsigned char *digest; in md5_password() local
241 digest = md5_final (); in md5_password()
242 memcpy (alt_result, digest, 16); in md5_password()
254 digest = md5_final (); in md5_password()
258 memcpy (alt_result, digest, 16); in md5_password()
277 digest = md5_final (); in md5_password()
284 digest[i == 4 ? 5 : 12+i] | (digest[6+i] << 8) | (digest[i] << 16); in md5_password()
301 unsigned int w = digest[11]; in md5_password()
339 unsigned char* digest = md5 (buffer); in test() local
343 sprintf (result+2*i, "%02x", digest[i]); in test()

123456