/libcore/luni/src/test/java/tests/targets/security/ |
MessageDigestTestMD2.java | 19 import java.security.MessageDigest; 30 MessageDigest digest = MessageDigest.getInstance("MD2"); 31 fail("MD2 MessageDigest algorithm must not be supported"); 37 MessageDigest digest = MessageDigest.getInstance( 39 fail("MD2 MessageDigest algorithm must not be supported"); 52 MessageDigest digest = MessageDigest.getInstance("MD2"); 54 digest = MessageDigest.getInstance("1.2.840.113549.2.2") [all...] |
/libcore/luni/src/main/java/java/security/ |
MessageDigest.java | 32 * MessageDigest digester = MessageDigest.getInstance("MD5"); 41 * <p>That is, after creating or resetting a {@code MessageDigest} you should 43 * to get the final digest. Note that calling {@code digest} resets the {@code MessageDigest}. 44 * Advanced users who want partial digests should clone their {@code MessageDigest} before 51 public abstract class MessageDigest extends MessageDigestSpi { 54 private static final Engine ENGINE = new Engine("MessageDigest"); 63 * Constructs a new instance of {@code MessageDigest} with the name of 69 protected MessageDigest(String algorithm) { 74 * Returns a new instance of {@code MessageDigest} that utilizes th [all...] |
/external/apache-harmony/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/ |
MessageDigest_Impl2Test.java | 24 import java.security.MessageDigest; 34 * Tests for <code>MessageDigest</code> constructor and methods 62 * Class under test for MessageDigest getInstance(String) 65 MessageDigest md1 = MessageDigest.getInstance("ABC"); 70 * Class under test for MessageDigest getInstance(String) 73 MessageDigest md2 = MessageDigest.getInstance("CBA"); 78 * Class under test for MessageDigest getInstance(String, String) 81 MessageDigest md1 = MessageDigest.getInstance("ABC", "MyProvider"); [all...] |
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
MessageDigest2Test.java | 23 import java.security.MessageDigest; 37 private static final String MESSAGEDIGEST_ID = "MessageDigest."; 63 * java.security.MessageDigest#MessageDigest(java.lang.String) 77 * java.security.MessageDigest#clone() 82 MessageDigest d1 = MessageDigest.getInstance(algorithm, e.getKey().getName()); 87 MessageDigest d2 = (MessageDigest) d1.clone(); 92 MessageDigest.isEqual(d1.digest(), d2.digest())) [all...] |
DigestInputStream2Test.java | 23 import java.security.MessageDigest; 33 MessageDigest digest; 37 * java.security.MessageDigest) 41 // java.security.MessageDigest) 50 // Test for method java.security.MessageDigest 62 MessageDigest originalDigest = (MessageDigest) (digest.clone()); 63 MessageDigest noChangeDigest = (MessageDigest) (digest.clone()); 73 assertTrue("MessageDigest changed even though processing was off" [all...] |
MessageDigest1Test.java | 22 import java.security.MessageDigest; 32 * Tests for <code>MessageDigest</code> constructor and methods 37 * java.security.MessageDigest#reset() 46 * java.security.MessageDigest#update(byte) 55 * java.security.MessageDigest#update(byte[], int, int) 99 * java.security.MessageDigest#update(byte[]) 109 * java.security.MessageDigest#update(ByteBuffer) 124 * java.security.MessageDigest#digest() 133 * java.security.MessageDigest#digest(byte[]) 143 * java.security.MessageDigest#digest(byte[], int, int [all...] |
DigestInputStreamTest.java | 29 import java.security.MessageDigest; 83 MessageDigest md = MessageDigest.getInstance(algorithmName[i]); 92 fail(getName() + ": no MessageDigest algorithms available - test not performed"); 116 MessageDigest md = MessageDigest.getInstance(algorithmName[ii]); 133 fail(getName() + ": no MessageDigest algorithms available - test not performed"); 149 MessageDigest md = MessageDigest.getInstance(algorithmName[ii]); 168 fail(getName() + ": no MessageDigest algorithms available - test not performed") [all...] |
DigestOutputStreamTest.java | 29 import java.security.MessageDigest; 74 * java.security.MessageDigest) 79 MessageDigest md = new MyMessageDigest1(); 105 MessageDigest digest = new MyMessageDigest1(); 118 * java.security.DigestOutputStream#setMessageDigest(MessageDigest) 122 MessageDigest digest = new MyMessageDigest1(); 147 MessageDigest md = MessageDigest.getInstance(algorithmName[k]); 163 fail(getName() + ": no MessageDigest algorithms available - test not performed"); 179 MessageDigest md = MessageDigest.getInstance(algorithmName[k]) [all...] |
/external/apache-harmony/security/src/test/api/java/org/apache/harmony/security/tests/java/security/ |
MessageDigest1Test.java | 22 import java.security.MessageDigest; 29 * Tests for <code>MessageDigest</code> constructor and methods 34 * @tests java.security.MessageDigest#reset() 43 * @tests java.security.MessageDigest#update(byte) 52 * @tests java.security.MessageDigest#update(byte[], int, int) 96 * @tests java.security.MessageDigest#update(byte[]) 106 * @tests java.security.MessageDigest#update(ByteBuffer) 121 * @tests java.security.MessageDigest#digest() 130 * @tests java.security.MessageDigest#digest(byte[]) 140 * @tests java.security.MessageDigest#digest(byte[], int, int [all...] |
DigestInputStream2Test.java | 24 import java.security.MessageDigest; 33 MessageDigest digest; 37 * java.security.MessageDigest) 41 // java.security.MessageDigest) 50 // Test for method java.security.MessageDigest 62 MessageDigest originalDigest = (MessageDigest) (digest.clone()); 63 MessageDigest noChangeDigest = (MessageDigest) (digest.clone()); 73 assertTrue("MessageDigest changed even though processing was off" [all...] |
DigestInputStreamTest.java | 28 import java.security.MessageDigest; 90 MessageDigest md = MessageDigest.getInstance(algorithmName[i]); 99 fail(getName() + ": no MessageDigest algorithms available - test not performed"); 123 MessageDigest md = MessageDigest.getInstance(algorithmName[ii]); 140 fail(getName() + ": no MessageDigest algorithms available - test not performed"); 156 MessageDigest md = MessageDigest.getInstance(algorithmName[ii]); 175 fail(getName() + ": no MessageDigest algorithms available - test not performed") [all...] |
ProviderTest.java | 68 assertNull(p.getProperty("MessageDigest.SHA-1")); 99 hm.put("MessageDigest.SHA-1", "aaa.bbb.ccc.ddd"); 107 !"aaa.bbb.ccc.ddd".equals(p.getProperty("MessageDigest.SHA-1").trim()) ) { 116 p.put("MessageDigest.SHA-256", "aaa.bbb.ccc.ddd"); 131 if (key.equals("MessageDigest.SHA-1") && val.equals("SomeClassName")) { 134 if (key.equals("Alg.Alias.MessageDigest.SHA1") && val.equals("SHA-1")) { 137 if (key.equals("MessageDigest.abc") && val.equals("SomeClassName")) { 146 if (key.equals("MessageDigest.SHA-256") && val.equals("aaa.bbb.ccc.ddd")) { 163 p.put("MessageDigest.SHA-256", "aaa.bbb.ccc.ddd"); 176 assertTrue(s1.contains("MessageDigest.SHA-256")) [all...] |
MessageDigest2Test.java | 25 import java.security.MessageDigest; 36 private static final String MESSAGEDIGEST_ID = "MessageDigest."; 64 * @tests java.security.MessageDigest#clone() 69 MessageDigest d1 = MessageDigest.getInstance(digestAlgs[i], 75 MessageDigest d2 = (MessageDigest) d1.clone(); 80 + digestAlgs[i], MessageDigest.isEqual(d1.digest(), d2 95 private void testSerializationSHA_DATA_2(MessageDigest sha) { 163 private void testSerializationSHA_DATA_1(MessageDigest sha) [all...] |
DigestOutputStreamTest.java | 80 * java.security.MessageDigest) 85 MessageDigest md = new MyMessageDigest1(); 103 MessageDigest digest = new MyMessageDigest1(); 117 * @tests java.security.DigestOutputStream#setMessageDigest(MessageDigest) 121 MessageDigest digest = new MyMessageDigest1(); 147 MessageDigest md = MessageDigest.getInstance(algorithmName[k]); 164 fail(getName() + ": no MessageDigest algorithms available - test not performed"); 180 MessageDigest md = MessageDigest.getInstance(algorithmName[k]) [all...] |
/libcore/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ |
ConnectionStateSSLv3.java | 21 import java.security.MessageDigest; 39 private final MessageDigest messageDigest; 121 MessageDigest md5 = MessageDigest.getInstance("MD5"); 200 messageDigest = MessageDigest.getInstance(hashName); 240 messageDigest.update(mac_write_secret); 241 messageDigest.update(pad_1); 242 messageDigest.update(write_seq_num) [all...] |
OpenSSLProvider.java | 37 put("MessageDigest.SHA-1", 39 put("Alg.Alias.MessageDigest.SHA1", "SHA-1"); 40 put("Alg.Alias.MessageDigest.SHA", "SHA-1"); 41 put("Alg.Alias.MessageDigest.1.3.14.3.2.26", "SHA-1"); 43 put("MessageDigest.SHA-256", 45 put("Alg.Alias.MessageDigest.SHA256", "SHA-256"); 46 put("Alg.Alias.MessageDigest.2.16.840.1.101.3.4.2.1", "SHA-256"); 48 put("MessageDigest.SHA-384", 50 put("Alg.Alias.MessageDigest.SHA384", "SHA-384"); 51 put("Alg.Alias.MessageDigest.2.16.840.1.101.3.4.2.2", "SHA-384") [all...] |
/external/guava/guava-tests/test/com/google/common/hash/ |
MessageDigestHashFunctionTest.java | 5 import java.security.MessageDigest; 31 MessageDigest.getInstance(algorithmName).digest(input),
|
/external/apache-harmony/security/src/test/api/java.injected/java/security/ |
ProviderTest.java | 71 !"SomeClassName".equals(p.getProperty("MessageDigest.SHA-1").trim()) ) { 96 Provider.Service s1 = p.getService("MessageDigest", "AbC"); 101 s = new Provider.Service(p, "MessageDigest", "SHA-1", 104 if (s1 == p.getService("MessageDigest", "SHA-1")) { 108 if (p.getService("MessageDigest", "SHA1") == null) { 135 if ("MessageDigest".equals(s.getType()) && 140 if ("MessageDigest".equals(s.getType()) && 179 if ("MessageDigest".equals(s.getType()) && 184 if ("MessageDigest".equals(s.getType()) && 200 put("MessageDigest.SHA-1", "SomeClassName") [all...] |
/external/apache-harmony/security/src/test/support/common/java/org/apache/harmony/security/tests/support/ |
MyMessageDigest1.java | 24 import java.security.MessageDigest; 27 * Tests implementation of MessageDigest 30 public class MyMessageDigest1 extends MessageDigest {
|
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/ |
MyMessageDigest1.java | 25 import java.security.MessageDigest; 28 * Tests implementation of MessageDigest 31 public class MyMessageDigest1 extends MessageDigest {
|
/external/apache-harmony/security/src/test/impl/java/org/apache/harmony/security/tests/provider/crypto/ |
CryptoProviderTest.java | 21 import java.security.MessageDigest; 64 MessageDigest md; 70 md = MessageDigest.getInstance(sha_1, providerName); 71 md = MessageDigest.getInstance(sha_1_alias, providerName); 72 md = MessageDigest.getInstance(sha_1_alias2, providerName);
|
/cts/tests/tests/security/src/android/security/cts/ |
CertificateTest.java | 26 import java.security.MessageDigest; 85 MessageDigest messageDigest = MessageDigest.getInstance("SHA1"); 86 messageDigest.update(certificate.getEncoded()); 87 byte[] sha1 = messageDigest.digest();
|
/frameworks/base/tests/CoreTests/android/core/ |
Sha1Test.java | 20 import java.security.MessageDigest; 45 MessageDigest digest = MessageDigest.getInstance("SHA-1");
|
/external/apache-harmony/security/src/test/impl/java.injected/java/security/ |
Provider_ImplTest.java | 60 !p.implementsAlg("MessageDigest", "SHA-1", null, null)) { 90 put("MessageDigest.SHA-1", "SomeClassName"); 91 put("MessageDigest.abc", "SomeClassName"); 92 put("Alg.Alias.MessageDigest.SHA1", "SHA-1");
|
/libcore/luni/src/test/java/libcore/java/security/ |
MessageDigestTest.java | 19 import java.security.MessageDigest; 37 MessageDigest sha = MessageDigest.getInstance("SHA"); 50 if (!type.equals("MessageDigest")) { 55 // MessageDigest.getInstance(String) 56 MessageDigest md1 = MessageDigest.getInstance(algorithm); 60 // MessageDigest.getInstance(String, Provider) 61 MessageDigest md2 = MessageDigest.getInstance(algorithm, provider) [all...] |