Home
last modified time | relevance | path

Searched refs:init (Results 1 – 25 of 144) sorted by relevance

123456

/libcore/luni/src/test/java/libcore/java/nio/channels/
DMembershipKeyTest.java44 private void init(boolean withSource) throws Exception { in init() method in MembershipKeyTest
63 init(false); in test_isValid_OnChannelCloseWithJoinWithoutSource()
68 init(true); in test_isValid_OnChannelCloseWithJoinWithSource()
79 init(false); in test_isValid_OnDropJoinWithoutSource()
84 init(true); in test_isValid_OnDropJoinWithSource()
95 init(false); in test_dropWithJoinWithoutSource()
100 init(true); in test_dropWithJoinWithSource()
120 init(false); in test_networkInterface()
127 init(true); in test_sourceAddressWithJoinWithSource()
132 init(false); in test_sourceAddressWithJoinWithoutSource()
[all …]
/libcore/support/src/test/java/org/apache/harmony/xnet/tests/support/
DSSLContextSpiImpl.java19 private boolean init = false; field in SSLContextSpiImpl
27 init = true; in engineInit()
31 if (!init) { in engineGetSocketFactory()
38 if (!init) { in engineGetServerSocketFactory()
45 if (!init) { in engineGetServerSessionContext()
52 if (!init) { in engineGetClientSessionContext()
68 if (!init) { in engineCreateSSLEngine()
75 if (!init) { in engineCreateSSLEngine()
DMySSLContextSpi.java42 private boolean init = false; field in MySSLContextSpi
49 init = true; in engineInit()
53 if (!init) { in engineGetSocketFactory()
60 if (!init) { in engineGetServerSocketFactory()
67 if (!init) { in engineGetServerSessionContext()
74 if (!init) { in engineGetClientSessionContext()
94 if (!init) { in engineCreateSSLEngine()
101 if (!init) { in engineCreateSSLEngine()
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DAlgorithmParametersTest.java114 params.init(new MyAlgorithmParameterSpec()); in test_getEncoded()
150 params.init(new MyAlgorithmParameterSpec()); in test_getEncodedLjava_lang_String()
165 params.init(new MyAlgorithmParameterSpec()); in test_getEncodedLjava_lang_String()
177 ap.init(new MyAlgorithmParameterSpec()); in test_getInstanceLjava_lang_String()
203 ap.init(new byte[6]); in test_getInstanceLjava_lang_StringLjava_lang_String()
279 params.init(new MyAlgorithmParameterSpec()); in test_getParameterSpecLjava_lang_Class()
297 params.init(new MyAlgorithmParameterSpec()); in test_getParameterSpecLjava_lang_Class()
311 ap.init(new byte[6], "aaa"); in test_getInstanceLjava_lang_StringLjava_security_Provider()
373 params.init(spec); in test_initLjava_security_spec_AlgorithmParameterSpec()
380 params.init(spec); in test_initLjava_security_spec_AlgorithmParameterSpec()
[all …]
DAlgorithmParameterGenerator2Test.java85 algParGen.init(pp, new SecureRandom()); in checkResult()
86 algParGen.init(pp); in checkResult()
88 algParGen.init(pp, null); in checkResult()
93 algParGen.init(pp, new SecureRandom()); in checkResult()
94 algParGen.init(pp); in checkResult()
96 algParGen.init(0, null); in checkResult()
97 algParGen.init(0, new SecureRandom()); in checkResult()
100 algParGen.init(-10, null); in checkResult()
105 algParGen.init(-10, new SecureRandom()); in checkResult()
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/
DCipherTest.java218 cipher.init(Cipher.ENCRYPT_MODE, CIPHER_KEY_3DES, new SecureRandom()); in test_getOutputSizeI()
234 cipher.init(Cipher.ENCRYPT_MODE, CIPHER_KEY_3DES); in test_initWithKey()
239 cipher.init(Cipher.ENCRYPT_MODE, CIPHER_KEY_3DES); in test_initWithKey()
251 cipher.init(Cipher.ENCRYPT_MODE, CIPHER_KEY_3DES, new SecureRandom()); in test_initWithSecureRandom()
255 cipher.init(Cipher.ENCRYPT_MODE, CIPHER_KEY_3DES, new SecureRandom()); in test_initWithSecureRandom()
269 cipher.init(Cipher.ENCRYPT_MODE, CIPHER_KEY_3DES, ap); in test_initWithAlgorithmParameterSpec()
275 cipher.init(Cipher.ENCRYPT_MODE, CIPHER_KEY_3DES, ap); in test_initWithAlgorithmParameterSpec()
283 cipher.init(Cipher.ENCRYPT_MODE, CIPHER_KEY_DES, ap); in test_initWithAlgorithmParameterSpec()
298 cipher.init(Cipher.ENCRYPT_MODE, CIPHER_KEY_3DES, ap, new SecureRandom()); in test_initWithKeyAlgorithmParameterSpecSecureRandom()
304 cipher.init(Cipher.ENCRYPT_MODE, CIPHER_KEY_3DES, ap, new SecureRandom()); in test_initWithKeyAlgorithmParameterSpecSecureRandom()
[all …]
DExemptionMechanismTest.java71 em.init(null); in testExemptionMechanism()
85 em.init(null); in testExemptionMechanism()
133 em.init(key); in testIsCryptoAllowed()
143 em.init(key1); in testIsCryptoAllowed()
163 em.init(key); in testGenExemptionBlob()
212 em.init(key); in test_genExemptionBlob()
220 em.init(key); in test_genExemptionBlob()
250 em.init(key); in test_genExemptionBlob$B()
290 em.init(key); in test_genExemptionBlob$BI()
402 em.init(key); in test_getOutputSizeI()
[all …]
DKeyAgreementTest.java325 kAgs[i].init(privKey); in testGenerateSecret03()
328 kAgs[i].init(privKey); in testGenerateSecret03()
332 kAgs[i].init(privKey); in testGenerateSecret03()
361 kAgs[i].init(privKey); in testDoPhase()
375 kAgs[i].init(privKey, dhPs); in testDoPhase()
377 kAgs[i].init(privKey, dhPs, random); in testDoPhase()
403 kAgs[i].init(publKey); in testInit01()
408 kAgs[i].init(publKey, new SecureRandom()); in testInit01()
413 kAgs[i].init(publKey, random); in testInit01()
418 kAgs[i].init(publKey, dhPs); in testInit01()
[all …]
DKeyGeneratorTest.java126 keyG.init(params, null); in testKeyGenerator()
131 keyG.init(keysize, null); in testKeyGenerator()
140 keyG.init(params, null); in testKeyGenerator()
145 keyG.init(keysize, null); in testKeyGenerator()
362 kgs[i].init(size[j]); in testInitKey()
369 kgs[i].init(size[j], random); in testInitKey()
394 kgs[i].init(aps); in testInitParams()
399 kgs[i].init(aps, new SecureRandom()); in testInitParams()
432 kgs[i].init(new SecureRandom()); in testGenerateKey()
436 kgs[i].init(defaultKeySize); in testGenerateKey()
[all …]
DMacTest.java90 mac.init(new SecretKeySpec(new byte[64], validAlgorithmsMac[i])); in mac.init()
363 macs[i].init(sks); in testMac09()
389 macs[i].init(sks); in testMac10()
434 macs[i].init(scs); in testMac11()
459 macs[i].init(scs); in testMac12()
490 macs[i].init(scs); in testMac13()
533 macs[i].init(scs); in testMac14()
536 macs[i].init(scs); in testMac14()
543 macs[i].init(scs); in testMac14()
546 macs[i].init(scs); in testMac14()
[all …]
DSealedObjectTest.java110 cipher.init(Cipher.ENCRYPT_MODE, key, ips); in testSealedObject1()
115 cipher.init(Cipher.ENCRYPT_MODE, key, ips); in testSealedObject1()
161 cipher.init(Cipher.ENCRYPT_MODE, key); in testGetAlgorithm()
176 cipher.init(Cipher.ENCRYPT_MODE, key); in testGetAlgorithmAfterSerialization()
209 cipher.init(Cipher.ENCRYPT_MODE, key, ips); in testGetObject1()
253 cipher.init(Cipher.ENCRYPT_MODE, key, ips); in testGetObject2()
258 cipher.init(Cipher.DECRYPT_MODE, key, ips); in testGetObject2()
298 cipher.init(Cipher.ENCRYPT_MODE, key); in testGetObject3()
303 cipher.init(Cipher.DECRYPT_MODE, key); in testGetObject3()
331 cipher.init(Cipher.ENCRYPT_MODE, key); in testDeserialization()
/libcore/luni/src/main/java/org/xml/sax/
DSAXParseException.java62 init(locator.getPublicId(), locator.getSystemId(), in SAXParseException()
65 init(null, null, -1, -1); in SAXParseException()
89 init(locator.getPublicId(), locator.getSystemId(), in SAXParseException()
92 init(null, null, -1, -1); in SAXParseException()
122 init(publicId, systemId, lineNumber, columnNumber); in SAXParseException()
154 init(publicId, systemId, lineNumber, columnNumber); in SAXParseException()
169 private void init (String publicId, String systemId, in init() method in SAXParseException
/libcore/luni/src/test/java/libcore/javax/crypto/
DCipherInputStreamTest.java111 cipher.init(Cipher.DECRYPT_MODE, key, iv); in testAvailable()
120 cipher.init(Cipher.DECRYPT_MODE, key, iv); in testDecrypt_NullInput_Discarded()
133 cipher.init(Cipher.ENCRYPT_MODE, key, iv); in testEncrypt()
145 cipher.init(Cipher.ENCRYPT_MODE, rc4Key); in testEncrypt_RC4()
157 cipher.init(Cipher.DECRYPT_MODE, key, iv); in testDecrypt()
165 cipher.init(Cipher.DECRYPT_MODE, rc4Key); in testDecrypt_RC4()
173 cipher.init(Cipher.DECRYPT_MODE, key, iv); in testSkip()
190 cipher.init(Cipher.DECRYPT_MODE, key, iv); in testCipherInputStream_TruncatedInput_Failure()
198 cipher.init(Cipher.DECRYPT_MODE, key, iv); in testCipherInputStream_NullInputStream_Failure()
223 cipher.init(Cipher.DECRYPT_MODE, key, iv); in testCloseTwice()
[all …]
DCipherTest.java52 c.init(Cipher.ENCRYPT_MODE, new MockKey()); in testCipher_getInstance_SuppliedProviderNotRegistered_Success()
68 c.init(Cipher.ENCRYPT_MODE, new MockKey()); in testCipher_getInstance_DoesNotSupportKeyClass_Success()
85 c.init(Cipher.ENCRYPT_MODE, new MockKey()); in testCipher_getInstance_SuppliedProviderNotRegistered_MultipartTransform_Success()
141 c.init(Cipher.ENCRYPT_MODE, new MockKey()); in testCipher_getInstance_DelayedInitialization_KeyType()
145 c.init(Cipher.ENCRYPT_MODE, new MockKey2()); in testCipher_getInstance_DelayedInitialization_KeyType()
159 c.init(Cipher.ENCRYPT_MODE, new Key() { in testCipher_getInstance_DelayedInitialization_KeyType()
269 c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(new byte[16], "FOO")); in testCipher_getInstance_WrongType_Failure()
296 c.init(Cipher.ENCRYPT_MODE, new MockKey(), new IvParameterSpec(new byte[12])); in testCipher_init_CallsInitWithParams_AlgorithmParameterSpec()
323 c.init(Cipher.ENCRYPT_MODE, new MockKey(), AlgorithmParameters.getInstance("AES")); in testCipher_init_CallsInitWithParams_AlgorithmParameters()
350 c.init(Cipher.ENCRYPT_MODE, new MockKey(), AlgorithmParameters.getInstance("AES")); in testCipher_init_CallsInitIgnoresRuntimeException()
[all …]
DCipherOutputStreamTest.java51 keygen.init(256); in testDecryptCorruptGCM()
60 cipher.init(Cipher.ENCRYPT_MODE, key); in testDecryptCorruptGCM()
62 cipher.init(Cipher.ENCRYPT_MODE, key, params); in testDecryptCorruptGCM()
69 cipher.init(Cipher.DECRYPT_MODE, key, params); in testDecryptCorruptGCM()
102 keygen.init(spec); in getAndroidKeyStoreSecretKey()
/libcore/luni/src/test/java/libcore/java/security/spec/
DAlgorithmParametersPSSTest.java73 params.init(DEFAULT_SPEC); in testGetProvider()
79 params.init(DEFAULT_SPEC); in testInitFailsWhenAlreadyInitialized()
81 params.init(DEFAULT_SPEC); in testInitFailsWhenAlreadyInitialized()
85 params.init(DEFAULT_SPEC_DER_ENCODED); in testInitFailsWhenAlreadyInitialized()
89 params.init(DEFAULT_SPEC_DER_ENCODED, "ASN.1"); in testInitFailsWhenAlreadyInitialized()
96 params.init(WEIRD_SPEC); in testInitWithPSSParameterSpec()
108 params.init(encoded); in assertInitWithDerEncoded()
112 params.init(encoded, "ASN.1"); in assertInitWithDerEncoded()
135 params.init(spec); in assertGetEncoded()
145 params.init(BROKEN_SPEC1_DER_ENCODED); in testGetEncodedWithBrokenInput()
[all …]
/libcore/luni/src/test/java/libcore/javax/crypto/spec/
DAlgorithmParametersTestPBES2.java171 ap.init(TEST_PBE_PARAMETER_SPEC); in testGetEncoded_knownAnswers()
183 ap.init(TEST_PBE_PARAMETER_SPEC); in test_encodeAndDecode()
186 ap2.init(ap.getEncoded()); in test_encodeAndDecode()
207 ap.init(TEST_PBE_PARAMETER_SPEC); in test_encryptWithAlgorithmParameters()
212 c.init(Cipher.ENCRYPT_MODE, key, ap); in test_encryptWithAlgorithmParameters()
217 c.init(Cipher.DECRYPT_MODE, key, ap); in test_encryptWithAlgorithmParameters()
232 ap.init(TEST_PBE_PARAMETER_SPEC); in test_correctNames()
246 c.init(Cipher.DECRYPT_MODE, key, new PBEParameterSpec(new byte[0], 1000)); in test_encryptWithNoSalt()
/libcore/ojluni/src/main/java/sun/security/provider/certpath/
DForwardState.java74 private boolean init = true; field in ForwardState
97 return init; in isInitial()
121 sb.append("\n init: ").append(String.valueOf(init)); in toString()
148 checker.init(true); in initState()
153 init = true; in initState()
187 if (!init && cert.getBasicConstraints() != -1) { in updateState()
194 if (init || !X509CertImpl.isSelfIssued(cert)){ in updateState()
218 init = false; in updateState()
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/
DCipherSymmetricKeyThread.java43 kg.init(getKeyLength(), new SecureRandom()); in crypt()
56 cip.init(Cipher.ENCRYPT_MODE, key, ivspec); in crypt()
61 cip.init(Cipher.DECRYPT_MODE, key, ivspec); in crypt()
64 cip.init(Cipher.ENCRYPT_MODE, key); in crypt()
67 cip.init(Cipher.DECRYPT_MODE, key); in crypt()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DSSLContext1Test.java112 sslContext.init(km, tm, new SecureRandom()); in test_ConstructorLjavax_net_ssl_SSLContextSpiLjava_security_ProviderLjava_lang_String()
118 sslContext.init(km, tm, null); in test_ConstructorLjavax_net_ssl_SSLContextSpiLjava_security_ProviderLjava_lang_String()
148 sslContext.init(null, null, new SecureRandom()); in test_createSSLEngine()
163 sslContext.init(null, null, new SecureRandom()); in test_createSSLEngineLjava_lang_StringI()
182 sslC[i].init(null, null, null); in test_getClientSessionContext()
455 kmf.init(null, new char[11]); in test_getServerSessionContext()
458 tmf.init(ks); in test_getServerSessionContext()
461 sslCi.init(kmf.getKeyManagers(), tms, new SecureRandom()); in test_getServerSessionContext()
500 kmf.init(ks, new char[10]); in test_getServerSocketFactory()
503 tmf.init(ks); in test_getServerSocketFactory()
[all …]
DSSLSessionContextTest.java24 context.init(null, null, null); in test_sessionCacheSize()
48 context.init(null, null, null); in test_sessionTimeout()
71 context.init(null, null, null); in test_getSession()
89 context.init(null, null, null); in test_getIds()
DX509KeyManagerTest.java623 void init(String name) { in init() method in X509KeyManagerTest
658 factory.init(keyTest, "1234".toCharArray()); in init()
669 init(CLIENT); in test_getClientAliases()
682 init(CLIENT); in test_chooseClientAlias()
695 init(SERVER); in test_getServerAliases()
708 init(SERVER); in test_chooseServerAlias()
723 init(SERVER); in test_getCertificateChain()
734 init(CLIENT); in test_getPrivateKey()
/libcore/luni/src/test/java/tests/security/cert/
DPKIXCertPathBuilderResultTest.java191 PKIXCertPathBuilderResult init = new PKIXCertPathBuilderResult( in test_clone() local
195 PKIXCertPathBuilderResult clone = (PKIXCertPathBuilderResult) init in test_clone()
197 assertSame(init.getCertPath(), clone.getCertPath()); in test_clone()
198 assertSame(init.getPolicyTree(), clone.getPolicyTree()); in test_clone()
199 assertSame(init.getPublicKey(), clone.getPublicKey()); in test_clone()
200 assertSame(init.getTrustAnchor(), clone.getTrustAnchor()); in test_clone()
/libcore/luni/src/test/java/libcore/java/security/
DOldAlgorithmParameterGeneratorTest.java35 gen.init(valid[i]); in test_initI()
53 gen.init(valid[i], new SecureRandom()); in test_initILjava_security_SecureRandom()
54 gen.init(valid[i], null); in test_initILjava_security_SecureRandom()
/libcore/ojluni/src/main/java/javax/crypto/spec/
DGCMParameterSpec.java88 init(tLen, src, 0, src.length); in GCMParameterSpec()
108 init(tLen, src, offset, len); in GCMParameterSpec()
114 private void init(int tLen, byte[] src, int offset, int len) { in init() method in GCMParameterSpec

123456