/libcore/ojluni/src/main/java/java/security/spec/ |
D | ECFieldF2m.java | 43 private int[] ks; field in ECFieldF2m 58 this.ks = null; in ECFieldF2m() 99 this.ks = new int[bitCount-2]; in ECFieldF2m() 100 for (int i = this.ks.length-1; i >= 0; i--) { in ECFieldF2m() 102 this.ks[i] = index; in ECFieldF2m() 133 public ECFieldF2m(int m, int[] ks) { in ECFieldF2m() argument 136 this.ks = ks.clone(); in ECFieldF2m() 140 if ((this.ks.length != 1) && (this.ks.length != 3)) { in ECFieldF2m() 144 for (int i = 0; i < this.ks.length; i++) { in ECFieldF2m() 145 if ((this.ks[i] < 1) || (this.ks[i] > m-1)) { in ECFieldF2m() [all …]
|
/libcore/luni/src/test/java/libcore/javax/crypto/ |
D | SecretKeyFactoryTest.java | 55 KeySpec ks = new PBEKeySpec(null); in test_PBKDF2_required_parameters() local 56 factory.generateSecret(ks); in test_PBKDF2_required_parameters() 61 KeySpec ks = new PBEKeySpec(new char[0]); in test_PBKDF2_required_parameters() local 62 factory.generateSecret(ks); in test_PBKDF2_required_parameters() 67 KeySpec ks = new PBEKeySpec(PASSWORD); in test_PBKDF2_required_parameters() local 68 factory.generateSecret(ks); in test_PBKDF2_required_parameters() 76 KeySpec ks = new PBEKeySpec(null, SALT, ITERATIONS); in test_PBKDF2_required_parameters() local 77 factory.generateSecret(ks); in test_PBKDF2_required_parameters() 82 KeySpec ks = new PBEKeySpec(new char[0], SALT, ITERATIONS); in test_PBKDF2_required_parameters() local 83 factory.generateSecret(ks); in test_PBKDF2_required_parameters() [all …]
|
/libcore/luni/src/test/java/tests/security/spec/ |
D | RSAPrivateCrtKeySpecTest.java | 44 KeySpec ks = new RSAPrivateCrtKeySpec( in testRSAPrivateCrtKeySpec01() local 53 assertTrue(ks instanceof RSAPrivateCrtKeySpec); in testRSAPrivateCrtKeySpec01() 62 KeySpec ks = new RSAPrivateCrtKeySpec( in testRSAPrivateCrtKeySpec02() local 71 assertTrue(ks instanceof RSAPrivateKeySpec); in testRSAPrivateCrtKeySpec02() 96 RSAPrivateCrtKeySpec ks = new RSAPrivateCrtKeySpec( in testGetCrtCoefficient() local 105 assertTrue(BigInteger.valueOf(5L).equals(ks.getCrtCoefficient())); in testGetCrtCoefficient() 113 RSAPrivateCrtKeySpec ks = new RSAPrivateCrtKeySpec( in testGetPrimeExponentP() local 122 assertTrue(BigInteger.valueOf(5L).equals(ks.getPrimeExponentP())); in testGetPrimeExponentP() 130 RSAPrivateCrtKeySpec ks = new RSAPrivateCrtKeySpec( in testGetPrimeExponentQ() local 139 assertTrue(BigInteger.valueOf(5L).equals(ks.getPrimeExponentQ())); in testGetPrimeExponentQ() [all …]
|
D | RSAMultiPrimePrivateCrtKeySpecTest.java | 65 KeySpec ks = new RSAMultiPrimePrivateCrtKeySpec( in testRSAMultiPrimePrivateCrtKeySpec01() local 75 assertTrue(ks instanceof RSAMultiPrimePrivateCrtKeySpec); in testRSAMultiPrimePrivateCrtKeySpec01() 405 KeySpec ks = new RSAMultiPrimePrivateCrtKeySpec( in testRSAMultiPrimePrivateCrtKeySpec12() local 415 assertTrue(ks instanceof RSAPrivateKeySpec); in testRSAMultiPrimePrivateCrtKeySpec12() 423 RSAMultiPrimePrivateCrtKeySpec ks = in testGetCrtCoefficient() local 434 assertTrue(BigInteger.ONE.equals(ks.getCrtCoefficient())); in testGetCrtCoefficient() 442 RSAMultiPrimePrivateCrtKeySpec ks = in testGetPrimeExponentP() local 453 assertTrue(BigInteger.ONE.equals(ks.getPrimeExponentP())); in testGetPrimeExponentP() 461 RSAMultiPrimePrivateCrtKeySpec ks = in testGetPrimeExponentQ() local 472 assertTrue(BigInteger.ONE.equals(ks.getPrimeExponentQ())); in testGetPrimeExponentQ() [all …]
|
D | RSAPublicKeySpecTest.java | 43 KeySpec ks = in testRSAPublicKeySpec01() local 47 assertTrue(ks instanceof RSAPublicKeySpec); in testRSAPublicKeySpec01() 56 KeySpec ks = in testRSAPublicKeySpec02() local 59 assertTrue(ks instanceof RSAPublicKeySpec); in testRSAPublicKeySpec02()
|
D | RSAPrivateKeySpecTest.java | 43 KeySpec ks = new RSAPrivateKeySpec(BigInteger.valueOf(1234567890L), in testRSAPrivateKeySpec() local 45 assertTrue(ks instanceof RSAPrivateKeySpec); in testRSAPrivateKeySpec()
|
D | DSAPublicKeySpecTest.java | 41 KeySpec ks = new DSAPublicKeySpec( in testDSAPublicKeySpec() local 47 assertTrue(ks instanceof DSAPublicKeySpec); in testDSAPublicKeySpec()
|
D | DSAPrivateKeySpecTest.java | 41 KeySpec ks = new DSAPrivateKeySpec( in testDSAPrivateKeySpec() local 47 assertTrue(ks instanceof DSAPrivateKeySpec); in testDSAPrivateKeySpec()
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | KeyStoreBuilderTest.java | 110 KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); in testNewInstanceKeyStoreProtectionParameter() local 112 KeyStore.Builder.newInstance(ks, null); in testNewInstanceKeyStoreProtectionParameter() 123 ks = KeyStore.getInstance(KeyStore.getDefaultType()); in testNewInstanceKeyStoreProtectionParameter() 125 KeyStore.Builder.newInstance(ks, pp[i]); in testNewInstanceKeyStoreProtectionParameter() 131 ks.load(null, pass); in testNewInstanceKeyStoreProtectionParameter() 132 ksB = KeyStore.Builder.newInstance(ks, pp[i]); in testNewInstanceKeyStoreProtectionParameter() 136 ksB = KeyStore.Builder.newInstance(ks, pp[i]); in testNewInstanceKeyStoreProtectionParameter() 140 assertEquals("Incorrect KeyStore", ks, ksB.getKeyStore()); in testNewInstanceKeyStoreProtectionParameter() 212 KeyStore ks = null; in testNewInstanceStringProviderFileProtectionParameter() local 287 ks = ksB.getKeyStore(); in testNewInstanceStringProviderFileProtectionParameter() [all …]
|
D | KeyFactorySpiTest.java | 43 KeySpec ks = new MyKeySpec(); in testKeyFactorySpi() local 46 keyFSpi.engineGeneratePrivate(ks); in testKeyFactorySpi() 47 keyFSpi.engineGeneratePublic(ks); in testKeyFactorySpi()
|
D | KeyStore3Test.java | 126 MyKeyStore ks = new MyKeyStore(new MyKeyStoreSpi(), p, "MyKeyStore"); in test_KeyStore() local 127 assertNotNull(ks); in test_KeyStore() 128 assertTrue(ks instanceof KeyStore); in test_KeyStore() 134 MyKeyStore ks = new MyKeyStore(null, null, null); in test_KeyStore() local 135 assertNotNull(ks); in test_KeyStore() 136 assertTrue(ks instanceof KeyStore); in test_KeyStore()
|
D | KeyStore4Test.java | 66 KeyStore ks = KeyStore.getInstance("TestKeyStore"); in testGetInstanceString() local 67 assertNotNull("keystore is null", ks); in testGetInstanceString() 68 assertEquals("KeyStore is not of expected Type", "TestKeyStore", ks.getType()); in testGetInstanceString() 92 KeyStore ks = KeyStore.getInstance("TestKeyStore", provider.getName()); in testGetInstanceStringString() local 93 assertNotNull("keystore is null", ks); in testGetInstanceStringString() 94 assertEquals("KeyStore is not of expected type", "TestKeyStore", ks.getType()); in testGetInstanceStringString() 155 KeyStore ks = KeyStore.getInstance("TestKeyStore", provider); in testGetInstanceStringProvider() local 156 assertNotNull("KeyStore is null", ks); in testGetInstanceStringProvider() 157 assertEquals("KeyStore is not of expected type", "TestKeyStore", ks.getType()); in testGetInstanceStringProvider()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | TrustManagerFactorySpiTest.java | 59 KeyStore ks = null; in test_engineInit_01() local 61 ks = KeyStore.getInstance(KeyStore.getDefaultType()); in test_engineInit_01() 62 ks.load(null, null); in test_engineInit_01() 63 tmf.init(ks); in test_engineInit_01() 68 assertEquals(ks, factory.getKs()); in test_engineInit_01() 88 KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); in test_engineInit_02() local 89 ks.load(null, null); in test_engineInit_02() 90 pr = new Parameters(ks); in test_engineInit_02() 116 KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); in test_engineGetTrustManagers() local 117 ks.load(null, null); in test_engineGetTrustManagers() [all …]
|
D | SSLContext1Test.java | 457 KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); in test_getServerSessionContext() local 458 tmf.init(ks); in test_getServerSessionContext() 494 KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); in test_getServerSocketFactory() local 496 ks.load(null, null); in test_getServerSocketFactory() 500 kmf.init(ks, new char[10]); in test_getServerSocketFactory() 503 tmf.init(ks); in test_getServerSocketFactory() 532 KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); in test_getSocketFactory() local 533 tmf.init(ks); in test_getSocketFactory() 581 KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); in test_init$Ljavax_net_ssl_KeyManager$Ljavax_net_ssl_TrustManagerLjava_security_SecureRandom() local 582 tmf.init(ks); in test_init$Ljavax_net_ssl_KeyManager$Ljavax_net_ssl_TrustManagerLjava_security_SecureRandom()
|
D | KeyManagerFactorySpiTest.java | 50 KeyStore ks; in test_engineInit_01() local 72 ks = KeyStore.getInstance(KeyStore.getDefaultType()); in test_engineInit_01() 73 kmf.engineInit(ks, null); in test_engineInit_01()
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/ |
D | SecretKeySpecTest.java | 68 SecretKeySpec ks = new SecretKeySpec(key, algorithm); in testSecretKeySpec1() local 72 key[0] == ks.getEncoded()[0]); in testSecretKeySpec1() 124 SecretKeySpec ks = new SecretKeySpec(key, algorithm); in testSecretKeySpec2() local 128 key[offset] == ks.getEncoded()[0]); in testSecretKeySpec2() 163 SecretKeySpec ks = new SecretKeySpec(key, algorithm); in testGetAlgorithm() local 166 algorithm, ks.getAlgorithm()); in testGetAlgorithm() 176 SecretKeySpec ks = new SecretKeySpec(key, algorithm); in testGetFormat() local 178 ks.getFormat() == "RAW"); in testGetFormat() 190 SecretKeySpec ks = new SecretKeySpec(key, algorithm); in testGetEncoded() local 191 byte[] result = ks.getEncoded(); in testGetEncoded() [all …]
|
D | DESedeKeySpecTest.java | 107 DESedeKeySpec ks; in testGetKey() local 109 ks = new DESedeKeySpec(key); in testGetKey() 114 byte[] res = ks.getKey(); in testGetKey() 124 ks = new DESedeKeySpec(key1, 2); in testGetKey() 129 res = ks.getKey(); in testGetKey()
|
D | DESKeySpecTest.java | 163 DESKeySpec ks; in testGetKey() local 165 ks = new DESKeySpec(key); in testGetKey() 170 byte[] res = ks.getKey(); in testGetKey() 179 ks = new DESKeySpec(key1, 2); in testGetKey() 184 res = ks.getKey(); in testGetKey()
|
/libcore/support/src/test/java/org/apache/harmony/xnet/tests/support/ |
D | TrustManagerFactorySpiImpl.java | 14 private static KeyStore ks = null; field in TrustManagerFactorySpiImpl 17 public void engineInit(KeyStore ks) throws KeyStoreException { in engineInit() argument 19 this.ks = ks; in engineInit() 46 return ks; in getKs()
|
D | MyTrustManagerFactorySpi.java | 35 protected void engineInit(KeyStore ks) throws KeyStoreException { in engineInit() argument 36 if (ks == null) { in engineInit() 64 public Parameters (KeyStore ks) { in Parameters() argument 65 this.keyStore = ks; in Parameters()
|
D | MyKeyManagerFactorySpi.java | 38 protected void engineInit(KeyStore ks, char[] password) in engineInit() argument 44 if (ks == null) { in engineInit() 72 public Parameters (KeyStore ks, char[] pass) { in Parameters() argument 73 this.keyStore = ks; in Parameters()
|
D | KeyManagerFactorySpiImpl.java | 16 public void engineInit(KeyStore ks, char[] password) in engineInit() argument 20 if (ks == null && password == null) { in engineInit() 24 if (ks == null) { in engineInit()
|
/libcore/ojluni/src/main/java/sun/util/resources/ |
D | OpenListResourceBundle.java | 105 Set<String> ks = createSet(); in keySet() local 106 ks.addAll(handleKeySet()); in keySet() 108 ks.addAll(parent.keySet()); in keySet() 112 keyset = ks; in keySet()
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/ |
D | SecretKeyFactoryThread.java | 34 KeySpec ks = (KeySpec) ((algName == "DES") ? new DESKeySpec(b) : in test() local 37 skf.generateSecret(ks); in test()
|
/libcore/ojluni/src/main/java/java/security/ |
D | KeyStore.java | 1857 KeyStore ks; in getKeyStore() 1859 ks = KeyStore.getInstance(type); in getKeyStore() 1861 ks = KeyStore.getInstance(type, provider); in getKeyStore() 1887 ks.load(in, password); in getKeyStore() 1888 return ks; in getKeyStore() 1960 KeyStore ks; in newInstance() 1962 ks = KeyStore.getInstance(type); in newInstance() 1964 ks = KeyStore.getInstance(type, provider); in newInstance() 1968 ks.load(param); in newInstance() 1976 ks.load(param); in newInstance() [all …]
|