/libcore/support/src/test/java/tests/security/ |
CipherAsymmetricCryptHelper.java | 19 import java.security.KeyPair; 22 public class CipherAsymmetricCryptHelper extends CipherHelper<KeyPair> { 31 public void test(KeyPair keyPair) { 32 test(keyPair.getPrivate(), keyPair.getPublic());
|
KeyPairGeneratorTest.java | 19 import java.security.KeyPair; 27 private final TestHelper<KeyPair> helper; 31 protected KeyPairGeneratorTest(String algorithmName, TestHelper<KeyPair> helper) { 53 KeyPair keyPair = generator.generateKeyPair(); 55 assertNotNull("no keypair generated", keyPair); 56 assertNotNull("no public key generated", keyPair.getPublic()); 57 assertNotNull("no private key generated", keyPair.getPrivate()); 59 helper.test(keyPair); [all...] |
AlgorithmParameterKeyAgreementHelper.java | 21 import java.security.KeyPair; 47 KeyPair keyPair = generator.generateKeyPair(); 57 keyAgreement.init(keyPair.getPrivate()); 62 keyAgreement.doPhase(keyPair.getPublic(), true);
|
KeyAgreementHelper.java | 20 import java.security.KeyPair; 27 public class KeyAgreementHelper extends TestHelper<KeyPair> { 35 @Override public void test(KeyPair keyPair) { 36 test(keyPair.getPrivate(), keyPair.getPublic());
|
SignatureHelper.java | 20 import java.security.KeyPair; 28 public class SignatureHelper extends TestHelper<KeyPair> { 38 public void test(KeyPair keyPair) { 39 test(keyPair.getPrivate(), keyPair.getPublic());
|
AlgorithmParameterAsymmetricHelper.java | 22 import java.security.KeyPair; 53 KeyPair keyPair = generator.generateKeyPair(); 66 cipher.init(Cipher.ENCRYPT_MODE, keyPair.getPublic(), parameters); 83 cipher.init(Cipher.DECRYPT_MODE, keyPair.getPrivate(), parameters);
|
AlgorithmParameterSignatureHelper.java | 22 import java.security.KeyPair; 74 KeyPair keyPair = generator.genKeyPair(); 77 signature.initSign(keyPair.getPrivate()); 96 signature.initVerify(keyPair.getPublic());
|
KeyFactoryTest.java | 20 import java.security.KeyPair; 93 check(new KeyPair(publicKey, privateKey)); 96 protected void check(KeyPair keyPair) {}
|
/libcore/luni/src/test/java/libcore/java/security/ |
OldKeyPairGeneratorTestDH.java | 19 import java.security.KeyPair; 33 KeyPair keyPair = generator.generateKeyPair(); 35 assertNotNull("no keypair generated", keyPair); 36 assertNotNull("no public key generated", keyPair.getPublic()); 37 assertNotNull("no private key generated", keyPair.getPrivate()); 39 new KeyAgreementHelper("DH").test(keyPair);
|
SignatureTest.java | 20 import java.security.KeyPair; 48 KeyPair kp = keyPair(algorithm); 72 private final Map<String, KeyPair> keypairAlgorithmToInstance 73 = new HashMap<String, KeyPair>(); 75 private KeyPair keyPair(String sigAlgorithm) throws Exception { 89 throw new Exception("Unknown KeyPair algorithm for Signature algorithm " 93 KeyPair kp = keypairAlgorithmToInstance.get(kpAlgorithm); 101 private void test_Signature(Signature sig, KeyPair keyPair) throws Exception [all...] |
/libcore/luni/src/test/java/libcore/javax/crypto/spec/ |
KeyFactoryTestDH.java | 18 import java.security.KeyPair; 30 @Override protected void check(KeyPair keyPair) { 31 new KeyAgreementHelper("DH").test(keyPair);
|
KeyFactoryTestDSA.java | 18 import java.security.KeyPair; 31 @Override protected void check(KeyPair keyPair) { 32 new SignatureHelper("DSA").test(keyPair);
|
KeyFactoryTestRSA.java | 18 import java.security.KeyPair; 32 @Override protected void check(KeyPair keyPair) { 33 new CipherAsymmetricCryptHelper("RSA").test(keyPair);
|
/external/apache-harmony/security/src/test/api/java/org/apache/harmony/security/tests/java/security/ |
KeyPairGenerator4Test.java | 21 import java.security.KeyPair; 38 assertNotNull("KeyPair is null", gen.genKeyPair()); 92 KeyPairGenerator keyPair = KeyPairGenerator.getInstance("DSA"); 93 keyPair.initialize(1024); 101 KeyPairGenerator keyPair = KeyPairGenerator.getInstance("DSA"); 102 keyPair.initialize(1024, new SecureRandom()); 118 KeyPairGenerator keyPair = KeyPairGenerator.getInstance("DSA"); 119 keyPair.initialize(new DSAParameterSpec(params.getP(), params.getQ(), 136 KeyPairGenerator keyPair = KeyPairGenerator.getInstance("DSA"); 137 keyPair.initialize(new DSAParameterSpec(params.getP(), params.getQ() [all...] |
KeyStorePrivateKeyEntryTest.java | 22 import java.security.KeyPair; 68 KeyPair keyPair = keyPairGenerator.generateKeyPair(); 69 PrivateKey privateKey = keyPair.getPrivate();
|
KeyStore3Test.java | 27 import java.security.KeyPair; 50 private KeyPair keyPair; 56 keyPair = keyPairGenerator.generateKeyPair(); 118 Key key = keyPair.getPrivate(); 140 Key key = keyPair.getPublic();
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
KeyPairGenerator4Test.java | 36 assertNotNull("KeyPair is null", gen.genKeyPair()); 90 KeyPairGenerator keyPair = KeyPairGenerator.getInstance("DSA"); 91 keyPair.initialize(1024); 99 KeyPairGenerator keyPair = KeyPairGenerator.getInstance("DSA"); 100 keyPair.initialize(1024, new SecureRandom()); 116 KeyPairGenerator keyPair = KeyPairGenerator.getInstance("DSA"); 117 keyPair.initialize(new DSAParameterSpec(params.getP(), params.getQ(), 134 KeyPairGenerator keyPair = KeyPairGenerator.getInstance("DSA"); 135 keyPair.initialize(new DSAParameterSpec(params.getP(), params.getQ(),
|
KeyStorePrivateKeyEntryTest.java | 22 import java.security.KeyPair; 68 KeyPair keyPair = keyPairGenerator.generateKeyPair(); 69 PrivateKey privateKey = keyPair.getPrivate();
|
KeyStore3Test.java | 29 import java.security.KeyPair; 47 private KeyPair keyPair; 53 keyPair = keyPairGenerator.generateKeyPair(); 109 Key key = keyPair.getPrivate(); 131 Key key = keyPair.getPublic();
|
/libcore/luni/src/test/java/tests/security/interfaces/ |
DSAPrivateKeyTest.java | 20 import java.security.KeyPair; 38 KeyPair keyPair = keyGen.generateKeyPair(); 39 DSAPrivateKey key = (DSAPrivateKey) keyPair.getPrivate();
|
/external/apache-harmony/security/src/test/api/java/org/apache/harmony/security/tests/java/security/serialization/ |
KeyPairTest.java | 26 import java.security.KeyPair; 38 * Tests for <code>KeyPair</code> serialization 43 private KeyPair keyPair; 51 keyPair = new KeyPair(publicKey, privateKey); 59 SerializationTest.verifyGolden(this, keyPair, comparator); 67 SerializationTest.verifySelf(keyPair, comparator); 71 // comparator for KeyPair objects 76 Key key1 = ((KeyPair)test).getPublic() [all...] |
/libcore/luni/src/test/java/tests/targets/security/ |
KeyStoreTest.java | 22 import java.security.KeyPair; 120 KeyPair keyPair = generator.generateKeyPair(); 122 PrivateKeyEntry privateKeyEntry = new PrivateKeyEntry(keyPair 143 assertEquals(keyPair.getPrivate(), privateKey);
|
/frameworks/base/keystore/java/android/security/ |
KeyChain.java | 30 import java.security.KeyPair; 358 KeyPair keyPair = (KeyPair) Credentials.convertFromPem(bytes).get(0); 359 return keyPair.getPrivate();
|
/external/apache-harmony/security/src/test/impl/java/org/apache/harmony/security/tests/provider/cert/ |
X509CRLImplTest.java | 26 import java.security.KeyPair; 182 KeyPair keyPair = keyGen.genKeyPair(); 183 publicKey = keyPair.getPublic(); 184 privateKey = keyPair.getPrivate();
|
/external/apache-harmony/security/src/test/impl/java/org/apache/harmony/security/tests/provider/crypto/ |
DSAKeyFactoryImplTest.java | 28 import java.security.KeyPair; 60 static KeyPair keyPair; 108 keyPair = kpGen.generateKeyPair(); 110 publicKey = (DSAPublicKey) keyPair.getPublic(); 111 privateKey = (DSAPrivateKey) keyPair.getPrivate();
|