/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | MessageDigest2Test.java | 23 import java.security.MessageDigest; 95 MessageDigest d1 = MessageDigest.getInstance(algorithm, e.getKey().getName()); in test_clone() 100 MessageDigest d2 = (MessageDigest) d1.clone(); in test_clone() 105 MessageDigest.isEqual(d1.digest(), d2.digest())); in test_clone() 113 private void testSerializationSHA_DATA_2(MessageDigest sha) throws Exception { in testSerializationSHA_DATA_2() 173 private void testSerializationSHA_DATA_1(MessageDigest sha) throws Exception { in testSerializationSHA_DATA_1() 217 MessageDigest sha = MessageDigest.getInstance("SHA"); in test_digest() 221 assertTrue("bug in SHA", MessageDigest.isEqual(digest, MESSAGE_DIGEST)); in test_digest() 229 assertTrue("bug in SHA", MessageDigest.isEqual(digest, MESSAGE_DIGEST_63_As)); in test_digest() 237 assertTrue("bug in SHA", MessageDigest.isEqual(digest, MESSAGE_DIGEST_64_As)); in test_digest() [all …]
|
D | DigestInputStreamTest.java | 29 import java.security.MessageDigest; 83 MessageDigest md = MessageDigest.getInstance(algorithmName[i]); in testDigestInputStream01() 116 MessageDigest md = MessageDigest.getInstance(algorithmName[ii]); in testRead01() 149 MessageDigest md = MessageDigest.getInstance(algorithmName[ii]); in testRead02() 184 MessageDigest md = MessageDigest.getInstance(algorithmName[ii]); in testRead03() 216 MessageDigest md = MessageDigest.getInstance(algorithmName[ii]); in testRead04() 295 MessageDigest md = MessageDigest.getInstance(algorithmName[ii]); in testReadbyteArrayintint01() 332 MessageDigest md = MessageDigest.getInstance(algorithmName[ii]); in testReadbyteArrayintint02() 372 MessageDigest md = MessageDigest.getInstance(algorithmName[ii]); in testReadbyteArrayintint03() 416 MessageDigest md = MessageDigest.getInstance(algorithmName[ii]); in testReadbyteArrayintint04() [all …]
|
D | DigestOutputStreamTest.java | 29 import java.security.MessageDigest; 79 MessageDigest md = new MyMessageDigest1(); in test_CtorLjava_io_OutputStreamLjava_security_MessageDigest() 105 MessageDigest digest = new MyMessageDigest1(); in test_getMessageDigest() 122 MessageDigest digest = new MyMessageDigest1(); in test_setMessageDigestLjava_security_MessageDigest() 147 MessageDigest md = MessageDigest.getInstance(algorithmName[k]); in testWriteint01() 179 MessageDigest md = MessageDigest.getInstance(algorithmName[k]); in testWriteint02() 213 MessageDigest md = MessageDigest.getInstance(algorithmName[k]); in testWriteint03() 287 MessageDigest md = MessageDigest.getInstance(algorithmName[k]); in test_write$BII_1() 320 MessageDigest md = MessageDigest.getInstance(algorithmName[k]); in test_write$BII_2() 357 MessageDigest md = MessageDigest.getInstance(algorithmName[k]); in test_write$BII_3() [all …]
|
D | DigestInputStream2Test.java | 23 import java.security.MessageDigest; 33 MessageDigest digest; 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() 76 MessageDigest changeDigest = (MessageDigest) (digest.clone()); in test_onZ() 86 !MessageDigest.isEqual(digest.digest(), changeDigest.digest())); in test_onZ() 231 digest = MessageDigest.getInstance("SHA-1"); in setUp()
|
D | MessageDigest1Test.java | 22 import java.security.MessageDigest; 188 MessageDigest digest = MessageDigest.getInstance("TestDigest", new TestProvider()); in test_digestLB$LILI() 205 assertTrue(MessageDigest.isEqual(b1, b4)); in test_isEqualLB$LB$() 206 assertFalse(MessageDigest.isEqual(b1, b2)); in test_isEqualLB$LB$() 207 assertFalse(MessageDigest.isEqual(b1, b3)); in test_isEqualLB$LB$() 238 MessageDigest md = null; in testSHAProvider() 240 md = MessageDigest.getInstance("SHA"); in testSHAProvider() 262 md = MessageDigest.getInstance("SHA"); in testSHAProvider() 281 md = MessageDigest.getInstance("UnknownDigest"); in testSHAProvider()
|
D | Provider2Test.java | 20 import java.security.MessageDigest; 142 MessageDigest messageDigest = MessageDigest in test_getAlias()
|
D | MessageDigestSpiTest.java | 27 import java.security.MessageDigest; 133 MessageDigest md5Digest = null; in test_engineGetDigestLength() 135 md5Digest = MessageDigest.getInstance("MD5"); in test_engineGetDigestLength()
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | MessageDigestBenchmark.java | 21 import java.security.MessageDigest; 66 MessageDigest digest = MessageDigest.getInstance(algorithm.toString(), in time() 75 MessageDigest digest = MessageDigest.getInstance(algorithm.toString(), in timeLargeArray() 84 MessageDigest digest = MessageDigest.getInstance(algorithm.toString(), in timeSmallChunkOfLargeArray() 93 MessageDigest digest = MessageDigest.getInstance(algorithm.toString(), in timeSmallByteBuffer() 104 MessageDigest digest = MessageDigest.getInstance(algorithm.toString(), in timeSmallDirectByteBuffer() 115 MessageDigest digest = MessageDigest.getInstance(algorithm.toString(), in timeLargeByteBuffer() 126 MessageDigest digest = MessageDigest.getInstance(algorithm.toString(), in timeLargeDirectByteBuffer() 137 MessageDigest digest = MessageDigest.getInstance(algorithm.toString(), in timeSmallChunkOfLargeByteBuffer() 148 MessageDigest digest = MessageDigest.getInstance(algorithm.toString(), in timeSmallChunkOfLargeDirectByteBuffer()
|
/libcore/ojluni/src/main/java/java/security/ |
D | MessageDigest.java | 133 public abstract class MessageDigest extends MessageDigestSpi { class 162 protected MessageDigest(String algorithm) { in MessageDigest() method in MessageDigest 193 public static MessageDigest getInstance(String algorithm) in getInstance() 196 MessageDigest md; in getInstance() 199 if (objs[0] instanceof MessageDigest) { in getInstance() 200 md = (MessageDigest)objs[0]; in getInstance() 255 public static MessageDigest getInstance(String algorithm, String provider) in getInstance() 263 if (objs[0] instanceof MessageDigest) { in getInstance() 264 MessageDigest md = (MessageDigest)objs[0]; in getInstance() 268 MessageDigest delegate = in getInstance() [all …]
|
D | DigestInputStream.java | 74 protected MessageDigest digest; 84 public DigestInputStream(InputStream stream, MessageDigest digest) { in DigestInputStream() 95 public MessageDigest getMessageDigest() { in getMessageDigest() 105 public void setMessageDigest(MessageDigest digest) { in setMessageDigest()
|
D | DigestOutputStream.java | 62 protected MessageDigest digest; 72 public DigestOutputStream(OutputStream stream, MessageDigest digest) { in DigestOutputStream() 83 public MessageDigest getMessageDigest() { in getMessageDigest() 93 public void setMessageDigest(MessageDigest digest) { in setMessageDigest()
|
/libcore/luni/src/test/java/tests/targets/security/ |
D | MessageDigestTestMD2.java | 18 import java.security.MessageDigest; 28 MessageDigest digest = MessageDigest.getInstance("MD2"); in testMessageDigest1() 35 MessageDigest digest = MessageDigest.getInstance( in testMessageDigest1() 49 MessageDigest digest = MessageDigest.getInstance("MD2"); in testMessageDigest2() 51 digest = MessageDigest.getInstance("1.2.840.113549.2.2"); in testMessageDigest2() 66 public static class MD2 extends MessageDigest {
|
D | MessageDigestTest.java | 19 import java.security.MessageDigest; 32 private MessageDigest digest; 41 this.digest = MessageDigest.getInstance(digestAlgorithmName); in setUp()
|
/libcore/luni/src/test/java/libcore/java/security/ |
D | MessageDigestTest.java | 20 import java.security.MessageDigest; 40 final MessageDigest md = MessageDigest.getInstance("SHA-256"); in testMessageDigest_MultipleThreads_Misuse() 71 MessageDigest md = MessageDigest.getInstance("SHA-256"); in testMessageDigestDelegateOverridesAllMethods() 78 assertFalse(mdClass.equals(MessageDigest.class)); in testMessageDigestDelegateOverridesAllMethods() 94 assertTrue(MessageDigest.isEqual(null, null)); in testIsEqual_nullValues() 95 assertFalse(MessageDigest.isEqual(null, new byte[1])); in testIsEqual_nullValues() 96 assertFalse(MessageDigest.isEqual(new byte[1], null)); in testIsEqual_nullValues()
|
/libcore/ojluni/src/main/java/sun/security/util/ |
D | ManifestEntryVerifier.java | 58 HashMap<String, MessageDigest> createdDigests; 61 ArrayList<MessageDigest> digests; 80 createdDigests = new HashMap<String, MessageDigest>(11); in ManifestEntryVerifier() 81 digests = new ArrayList<MessageDigest>(); in ManifestEntryVerifier() 130 MessageDigest digest = createdDigests.get(algorithm); in setEntry() 135 digest = MessageDigest.getInstance in setEntry() 205 MessageDigest digest = digests.get(i); in verify() 217 if (!MessageDigest.isEqual(theHash, manHash)) in verify()
|
D | SignatureFileVerifier.java | 32 import java.security.MessageDigest; 92 private HashMap<String, MessageDigest> createdDigests; 226 private MessageDigest getDigest(String algorithm) throws SignatureException { in getDigest() 236 createdDigests = new HashMap<String, MessageDigest>(); in getDigest() 238 MessageDigest digest = createdDigests.get(algorithm); in getDigest() 242 digest = MessageDigest.getInstance(algorithm); in getDigest() 370 MessageDigest digest = getDigest(algorithm); in verifyManifestHash() 384 if (MessageDigest.isEqual(computedHash, in verifyManifestHash() 412 MessageDigest digest = getDigest(algorithm); in verifyManifestMainAttrs() 429 if (MessageDigest.isEqual(computedHash, in verifyManifestMainAttrs() [all …]
|
D | ManifestDigester.java | 210 public byte[] digest(MessageDigest md) in digest() 221 private void doOldStyle(MessageDigest md, in doOldStyle() 249 public byte[] digestWorkaround(MessageDigest md) in digestWorkaround() 264 public byte[] manifestDigest(MessageDigest md) in manifestDigest()
|
/libcore/ojluni/annotations/hiddenapi/sun/security/util/ |
D | ManifestDigester.java | 52 public byte[] manifestDigest(java.security.MessageDigest md) { in manifestDigest() 70 public byte[] digest(java.security.MessageDigest md) { in digest() 75 java.security.MessageDigest md, byte[] bytes, int offset, int length) { in doOldStyle() 80 public byte[] digestWorkaround(java.security.MessageDigest md) { in digestWorkaround()
|
/libcore/ojluni/annotations/sdk/nullability/java/security/ |
D | MessageDigest.annotated.java | 35 public abstract class MessageDigest extends java.security.MessageDigestSpi { class 37 protected MessageDigest(@libcore.util.NonNull java.lang.String algorithm) { throw new RuntimeExcept… in MessageDigest() method in MessageDigest 39 @libcore.util.NonNull public static java.security.MessageDigest getInstance(@libcore.util.NonNull j… in getInstance() 41 @libcore.util.NonNull public static java.security.MessageDigest getInstance(@libcore.util.NonNull j… in getInstance() 43 @libcore.util.NonNull public static java.security.MessageDigest getInstance(@libcore.util.NonNull j… in getInstance()
|
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/ |
D | MyMessageDigest1.java | 25 import java.security.MessageDigest; 31 public class MyMessageDigest1 extends MessageDigest {
|
/libcore/ojluni/src/main/java/sun/security/x509/ |
D | KeyIdentifier.java | 30 import java.security.MessageDigest; 93 MessageDigest md = null; in KeyIdentifier() 95 md = MessageDigest.getInstance("SHA1"); in KeyIdentifier()
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | FilterInputStreamNullSourceTest.java | 27 import java.security.MessageDigest; 70 MessageDigest md5 = MessageDigest.getInstance("MD5"); in testDigestInputStream()
|
/libcore/ojluni/src/main/java/javax/crypto/spec/ |
D | SecretKeySpec.java | 28 import java.security.MessageDigest; 232 return MessageDigest.isEqual(this.key, thatKey); in equals()
|
/libcore/ojluni/src/main/java/sun/security/provider/certpath/ |
D | CertId.java | 30 import java.security.MessageDigest; 83 MessageDigest md = null; in CertId() 85 md = MessageDigest.getInstance("SHA1"); in CertId()
|
/libcore/ojluni/src/main/java/java/util/ |
D | UUID.java | 163 MessageDigest md; in nameUUIDFromBytes() 165 md = MessageDigest.getInstance("MD5"); in nameUUIDFromBytes()
|