Home
last modified time | relevance | path

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

12345678910>>...12

/external/smack/src/org/xbill/DNS/utils/
DHMAC.java16 private MessageDigest digest; field in HMAC
29 key = digest.digest(key); in init()
30 digest.reset(); in init()
42 digest.update(ipad); in init()
52 HMAC(MessageDigest digest, int blockLength, byte [] key) { in HMAC() argument
53 digest.reset(); in HMAC()
54 this.digest = digest; in HMAC()
68 digest = MessageDigest.getInstance(digestName); in HMAC()
87 HMAC(MessageDigest digest, byte [] key) { in HMAC() argument
88 this(digest, 64, key); in HMAC()
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/macs/
DHMac.java23 private Digest digest; field in HMac
64 Digest digest) in getByteLength() argument
66 if (digest instanceof ExtendedDigest) in getByteLength()
68 return ((ExtendedDigest)digest).getByteLength(); in getByteLength()
71 Integer b = (Integer)blockLengths.get(digest.getAlgorithmName()); in getByteLength()
75 … throw new IllegalArgumentException("unknown digest passed: " + digest.getAlgorithmName()); in getByteLength()
88 Digest digest) in HMac() argument
90 this(digest, getByteLength(digest)); in HMac()
94 Digest digest, in HMac() argument
97 this.digest = digest; in HMac()
[all …]
/external/apache-harmony/security/src/test/api/java/org/apache/harmony/security/tests/java/security/
DDigestInputStream2Test.java33 MessageDigest digest; field in DigestInputStream2Test
42 DigestInputStream dis = new DigestInputStream(inStream, digest); in test_ConstructorLjava_io_InputStreamLjava_security_MessageDigest()
52 DigestInputStream dis = new DigestInputStream(inStream, digest); in test_getMessageDigest()
53 assertEquals("getMessageDigest returned a bogus result", digest, dis in test_getMessageDigest()
62 MessageDigest originalDigest = (MessageDigest) (digest.clone()); in test_onZ()
63 MessageDigest noChangeDigest = (MessageDigest) (digest.clone()); in test_onZ()
74 MessageDigest.isEqual(noChangeDigest.digest(), originalDigest in test_onZ()
75 .digest())); in test_onZ()
76 MessageDigest changeDigest = (MessageDigest) (digest.clone()); in test_onZ()
77 dis = new DigestInputStream(inStream, digest); in test_onZ()
[all …]
DMessageDigest2Test.java80 + digestAlgs[i], MessageDigest.isEqual(d1.digest(), d2 in test_clone()
81 .digest())); in test_clone()
153 byte[] hash = sha.digest(data); in testSerializationSHA_DATA_2()
203 byte[] hash = sha.digest(data); in testSerializationSHA_DATA_1()
223 byte[] digest = sha.digest(); in test_digest()
224 assertTrue("bug in SHA", MessageDigest.isEqual(digest, MESSAGE_DIGEST)); in test_digest()
231 digest = sha.digest(); in test_digest()
232 assertTrue("bug in SHA", MessageDigest.isEqual(digest, in test_digest()
240 digest = sha.digest(); in test_digest()
241 assertTrue("bug in SHA", MessageDigest.isEqual(digest, in test_digest()
[all …]
DDigestOutputStreamTest.java103 MessageDigest digest = new MyMessageDigest1(); in test_getMessageDigest() local
107 DigestOutputStream dos = new DigestOutputStream(out, digest); in test_getMessageDigest()
108 assertSame(digest, dos.getMessageDigest()); in test_getMessageDigest()
121 MessageDigest digest = new MyMessageDigest1(); in test_setMessageDigestLjava_security_MessageDigest() local
127 dos.setMessageDigest(digest); in test_setMessageDigestLjava_security_MessageDigest()
128 assertSame(digest, dos.getMessageDigest()); in test_setMessageDigestLjava_security_MessageDigest()
157 assertTrue("update", Arrays.equals(dos.getMessageDigest().digest(), in testWriteint01()
195 assertTrue("update", Arrays.equals(dos.getMessageDigest().digest(), in testWriteint02()
300 assertTrue("update", Arrays.equals(dos.getMessageDigest().digest(), in testWritebyteArrayintint01()
335 assertTrue("update", Arrays.equals(dos.getMessageDigest().digest(), in testWritebyteArrayintint02()
[all …]
/external/openssl/crypto/evp/
Ddigest.c153 if (ctx->engine && ctx->digest && (!type || in EVP_DigestInit_ex()
154 (type && (type->type == ctx->digest->type)))) in EVP_DigestInit_ex()
196 if(!ctx->digest) in EVP_DigestInit_ex()
202 if (ctx->digest != type) in EVP_DigestInit_ex()
204 if (ctx->digest && ctx->digest->ctx_size) in EVP_DigestInit_ex()
206 ctx->digest=type; in EVP_DigestInit_ex()
242 return ctx->digest->init(ctx); in EVP_DigestInit_ex()
271 OPENSSL_assert(ctx->digest->md_size <= EVP_MAX_MD_SIZE); in EVP_DigestFinal_ex()
272 ret=ctx->digest->final(ctx,md); in EVP_DigestFinal_ex()
274 *size=ctx->digest->md_size; in EVP_DigestFinal_ex()
[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/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 …]
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 …]
/external/apache-harmony/security/src/test/impl/java/org/apache/harmony/security/tests/provider/crypto/
DSHA1_MessageDigestTest.java150 byte digest[]; // implementation variables in testClone()
160 digest = md.digest(); in testClone()
161 digestClone = clone.digest(); in testClone()
164 digest.length, digestClone.length); in testClone()
165 for (int i = 0; i < digest.length; i++) { in testClone()
166 assertEquals("digest[i] != digestClone[i] : i=" + i, digest[i], digestClone[i]); in testClone()
187 bytes = md.digest(); in testDigest01()
211 results = md.digest(); in testDigest02()
238 bytes1 = md.digest(); in testDigest03()
241 bytes2 = md.digest(); in testDigest03()
[all …]
/external/smack/src/org/xbill/DNS/
DDLVRecord.java28 private byte [] digest; field in DLVRecord
46 int digestid, byte [] digest) in DLVRecord() argument
52 this.digest = digest; in DLVRecord()
60 digest = in.readByteArray(); in rrFromWire()
68 digest = st.getHex(); in rdataFromString()
82 if (digest != null) { in rrToString()
84 sb.append(base16.toString(digest)); in rrToString()
112 return digest; in getDigest()
128 if (digest != null) in rrToWire()
129 out.writeByteArray(digest); in rrToWire()
DDSRecord.java41 private byte [] digest; field in DSRecord
59 int digestid, byte [] digest) in DSRecord() argument
65 this.digest = digest; in DSRecord()
85 digest = in.readByteArray(); in rrFromWire()
93 digest = st.getHex(); in rdataFromString()
107 if (digest != null) { in rrToString()
109 sb.append(base16.toString(digest)); in rrToString()
137 return digest; in getDigest()
153 if (digest != null) in rrToWire()
154 out.writeByteArray(digest); in rrToWire()
/external/guava/guava/src/com/google/common/hash/
DMessageDigestHashFunction.java63 private final MessageDigest digest; field in MessageDigestHashFunction.MessageDigestHasher
67 private MessageDigestHasher(MessageDigest digest) { in MessageDigestHasher() argument
68 this.digest = digest; in MessageDigestHasher()
74 digest.update(b); in putByte()
80 digest.update(bytes); in putBytes()
87 digest.update(bytes, off, len); in putBytes()
94 digest.update(scratch.array(), 0, Shorts.BYTES); in putShort()
102 digest.update(scratch.array(), 0, Ints.BYTES); in putInt()
110 digest.update(scratch.array(), 0, Longs.BYTES); in putLong()
118 digest.update(scratch.array(), 0, 4); in putFloat()
[all …]
/external/smack/src/org/jivesoftware/smack/packet/
DAuthentication.java33 private String digest = null; field in Authentication
96 return digest; in getDigest()
112 this.digest = StringUtils.hash(connectionID + password); in setDigest()
126 public void setDigest(String digest) { in setDigest() argument
127 this.digest = digest; in setDigest()
159 if (digest != null) { in getChildElementXML()
160 if (digest.equals("")) { in getChildElementXML()
164 buf.append("<digest>").append(digest).append("</digest>"); in getChildElementXML()
167 if (password != null && digest == null) { in getChildElementXML()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/util/
DDSABase.java17 protected Digest digest; field in DSABase
22 Digest digest, in DSABase() argument
26 this.digest = digest; in DSABase()
35 digest.update(b); in engineUpdate()
44 digest.update(b, off, len); in engineUpdate()
50 byte[] hash = new byte[digest.getDigestSize()]; in engineSign()
52 digest.doFinal(hash, 0); in engineSign()
70 byte[] hash = new byte[digest.getDigestSize()]; in engineVerify()
72 digest.doFinal(hash, 0); in engineVerify()
/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,
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/signers/
DRSADigestSigner.java32 private final Digest digest; field in RSADigestSigner
64 Digest digest) in RSADigestSigner() argument
66 this.digest = digest; in RSADigestSigner()
68 …algId = new AlgorithmIdentifier((ASN1ObjectIdentifier)oidMap.get(digest.getAlgorithmName()), DERNu… in RSADigestSigner()
76 return digest.getAlgorithmName() + "withRSA"; in getAlgorithmName()
124 digest.update(input); in update()
135 digest.update(input, inOff, length); in update()
150 byte[] hash = new byte[digest.getDigestSize()]; in generateSignature()
151 digest.doFinal(hash, 0); in generateSignature()
176 byte[] hash = new byte[digest.getDigestSize()]; in verifySignature()
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/io/
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()
DDigestOutputStream.java11 protected Digest digest; field in DigestOutputStream
16 this.digest = Digest; in DigestOutputStream()
22 digest.update((byte)b); in write()
31 digest.update(b, off, len); in write()
36 byte[] res = new byte[digest.getDigestSize()]; in getDigest()
38 digest.doFinal(res, 0); in getDigest()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/rsa/
DDigestSignatureSpi.java51 private Digest digest; field in DigestSignatureSpi
57 Digest digest, in DigestSignatureSpi() argument
60 this.digest = digest; in DigestSignatureSpi()
68 Digest digest, in DigestSignatureSpi() argument
71 this.digest = digest; in DigestSignatureSpi()
87 digest.reset(); in engineInitVerify()
102 digest.reset(); in engineInitSign()
122 digest.update(b); in engineUpdate()
131 digest.update(b, off, len); in engineUpdate()
137 byte[] hash = new byte[digest.getDigestSize()]; in engineSign()
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jce/provider/
DJCESecretKeyFactory.java112 private int digest; field in JCESecretKeyFactory.PBEKeyFactory
121 int digest, in PBEKeyFactory() argument
129 this.digest = digest; in PBEKeyFactory()
145 … return new BCPBEKey(this.algName, this.algOid, scheme, digest, keySize, ivSize, pbeSpec, null); in engineGenerateSecret()
150 param = Util.makePBEParameters(pbeSpec, scheme, digest, keySize, ivSize); in engineGenerateSecret()
154 param = Util.makePBEMacParameters(pbeSpec, scheme, digest, keySize); in engineGenerateSecret()
157 … return new BCPBEKey(this.algName, this.algOid, scheme, digest, keySize, ivSize, pbeSpec, param); in engineGenerateSecret()
169 private int digest; field in JCESecretKeyFactory.DESPBEKeyFactory
178 int digest, in DESPBEKeyFactory() argument
186 this.digest = digest; in DESPBEKeyFactory()
[all …]
/external/skia/tests/
DMD5Test.cpp26 SkMD5::Digest digest; in md5_test() local
27 context.finish(digest); in md5_test()
29 REPORTER_ASSERT(reporter, digests_equal(expectedDigest, digest)); in md5_test()
40 SkMD5::Digest digest; in md5_test() local
41 context.finish(digest); in md5_test()
43 REPORTER_ASSERT(reporter, digests_equal(expectedDigest, digest)); in md5_test()
49 SkMD5::Digest digest; member
63 md5_test(md5_tests[i].message, md5_tests[i].digest, reporter); in TestMD5()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/
DPBESecretKeyFactory.java18 private int digest; field in PBESecretKeyFactory
27 int digest, in PBESecretKeyFactory() argument
35 this.digest = digest; in PBESecretKeyFactory()
51 … return new BCPBEKey(this.algName, this.algOid, scheme, digest, keySize, ivSize, pbeSpec, null); in engineGenerateSecret()
56 param = PBE.Util.makePBEParameters(pbeSpec, scheme, digest, keySize, ivSize); in engineGenerateSecret()
60 param = PBE.Util.makePBEMacParameters(pbeSpec, scheme, digest, keySize); in engineGenerateSecret()
63 … return new BCPBEKey(this.algName, this.algOid, scheme, digest, keySize, ivSize, pbeSpec, param); in engineGenerateSecret()
/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/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dsa/
DDSASigner.java42 private Digest digest; field in DSASigner
47 Digest digest, in DSASigner() argument
50 this.digest = digest; in DSASigner()
92 digest.reset(); in engineInitVerify()
125 digest.reset(); in engineInitSign()
133 digest.update(b); in engineUpdate()
142 digest.update(b, off, len); in engineUpdate()
148 byte[] hash = new byte[digest.getDigestSize()]; in engineSign()
150 digest.doFinal(hash, 0); in engineSign()
168 byte[] hash = new byte[digest.getDigestSize()]; in engineVerify()
[all …]

12345678910>>...12