/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ |
D | CipherTest.java | 42 import javax.crypto.Cipher; 92 Cipher cipher = Cipher.getInstance("DESede/CBC/PKCS5Padding"); in test_getInstanceLjava_lang_String() 96 Cipher.getInstance("WrongAlgorithmName"); in test_getInstanceLjava_lang_String() 114 Cipher cipher = Cipher.getInstance("DES", providers[i].getName()); in test_getInstanceLjava_lang_StringLjava_lang_String() 118 cipher = Cipher.getInstance("DoBeDoBeDo", providers[i]); in test_getInstanceLjava_lang_StringLjava_lang_String() 125 Cipher.getInstance("DES", (String) null); in test_getInstanceLjava_lang_StringLjava_lang_String() 131 Cipher.getInstance("DES", "IHaveNotBeenConfigured"); in test_getInstanceLjava_lang_StringLjava_lang_String() 148 Cipher cipher = Cipher.getInstance("DES", providers[i]); in test_getInstanceLjava_lang_StringLjava_security_Provider() 153 Cipher.getInstance("DES", (Provider) null); in test_getInstanceLjava_lang_StringLjava_security_Provider() 159 Cipher.getInstance("WrongAlg", providers[0]); in test_getInstanceLjava_lang_StringLjava_security_Provider() [all …]
|
D | SealedObjectTest.java | 39 import javax.crypto.Cipher; 53 public Mock_SealedObject(Serializable object, Cipher c) in Mock_SealedObject() 109 Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding"); in testSealedObject1() 110 cipher.init(Cipher.ENCRYPT_MODE, key, ips); in testSealedObject1() 114 cipher = Cipher.getInstance("DES/CBC/NoPadding"); in testSealedObject1() 115 cipher.init(Cipher.ENCRYPT_MODE, key, ips); in testSealedObject1() 138 Cipher cipher = new NullCipher(); in testSealedObject2() 160 Cipher cipher = Cipher.getInstance(algorithm); in testGetAlgorithm() 161 cipher.init(Cipher.ENCRYPT_MODE, key); in testGetAlgorithm() 175 Cipher cipher = Cipher.getInstance(algorithm); in testGetAlgorithmAfterSerialization() [all …]
|
D | CipherOutputStreamTest.java | 21 import javax.crypto.Cipher; 32 new CipherOutputStream((OutputStream) null, Cipher in test_close() 41 new CipherOutputStream(ch, Cipher in test_close()
|
D | CipherOutputStream1Test.java | 45 import javax.crypto.Cipher; 157 Cipher cf = Cipher.getInstance("DES/CBC/PKCS5Padding"); in testWrite5() 208 Cipher c = Cipher.getInstance("DES/CBC/NoPadding"); in test_ConstructorLjava_io_OutputStreamLjavax_crypto_Cipher() 209 c.init(Cipher.ENCRYPT_MODE, key); in test_ConstructorLjava_io_OutputStreamLjavax_crypto_Cipher() 309 Cipher cipherThatThrowsOnSecondDoFinal = new Cipher( in test_close_doubleCloseDoesntCallDoFinal() 319 cipherThatThrowsOnSecondDoFinal.init(Cipher.ENCRYPT_MODE, (Key) null); in test_close_doubleCloseDoesntCallDoFinal()
|
D | CipherInputStreamTest.java | 26 import javax.crypto.Cipher; 53 Cipher.getInstance("DES/CBC/PKCS5Padding")).close(); in testClose() 60 Cipher.getInstance("DES/CBC/PKCS5Padding")).close(); in testClose()
|
D | NullCipherTest.java | 28 import javax.crypto.Cipher; 41 private Cipher c; 76 c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(new byte[1], "algorithm")); in testInitintKey() 84 c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(new byte[1], in testInitintKeySecureRandom() 93 c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(new byte[1], in testInitintKeyAlgorithmParameterSpec()
|
D | CipherInputStream1Test.java | 31 import javax.crypto.Cipher; 259 Cipher c = Cipher.getInstance("DES/CBC/NoPadding"); in test_ConstructorLjava_io_InputStreamLjavax_crypto_Cipher() 260 c.init(Cipher.ENCRYPT_MODE, key); in test_ConstructorLjava_io_InputStreamLjavax_crypto_Cipher()
|
/libcore/luni/src/test/java/libcore/javax/crypto/ |
D | CipherTest.java | 26 import javax.crypto.Cipher; 51 Cipher c = Cipher.getInstance("FOO", mockProvider); in testCipher_getInstance_SuppliedProviderNotRegistered_Success() 52 c.init(Cipher.ENCRYPT_MODE, new MockKey()); in testCipher_getInstance_SuppliedProviderNotRegistered_Success() 67 Cipher c = Cipher.getInstance("FOO", mockProvider); in testCipher_getInstance_DoesNotSupportKeyClass_Success() 68 c.init(Cipher.ENCRYPT_MODE, new MockKey()); in testCipher_getInstance_DoesNotSupportKeyClass_Success() 84 Cipher c = Cipher.getInstance("FOO/FOO/FOO", mockProvider); in testCipher_getInstance_SuppliedProviderNotRegistered_MultipartTransform_Success() 85 c.init(Cipher.ENCRYPT_MODE, new MockKey()); in testCipher_getInstance_SuppliedProviderNotRegistered_MultipartTransform_Success() 106 Cipher c = Cipher.getInstance("FOO", mockProvider2); in testCipher_getInstance_OnlyUsesSpecifiedProvider_SameNameAndClass_Success() 140 Cipher c = Cipher.getInstance("FOO"); in testCipher_getInstance_DelayedInitialization_KeyType() 141 c.init(Cipher.ENCRYPT_MODE, new MockKey()); in testCipher_getInstance_DelayedInitialization_KeyType() [all …]
|
D | CipherInputStreamTest.java | 33 import javax.crypto.Cipher; 110 Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); in testAvailable() 111 cipher.init(Cipher.DECRYPT_MODE, key, iv); in testAvailable() 119 Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); in testDecrypt_NullInput_Discarded() 120 cipher.init(Cipher.DECRYPT_MODE, key, iv); in testDecrypt_NullInput_Discarded() 132 Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); in testEncrypt() 133 cipher.init(Cipher.ENCRYPT_MODE, key, iv); in testEncrypt() 144 Cipher cipher = Cipher.getInstance("RC4"); in testEncrypt_RC4() 145 cipher.init(Cipher.ENCRYPT_MODE, rc4Key); in testEncrypt_RC4() 156 Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); in testDecrypt() [all …]
|
D | CipherOutputStreamTest.java | 28 import javax.crypto.Cipher; 40 Cipher cipher; in testDecryptCorruptGCM() 42 cipher = Cipher.getInstance("AES/GCM/NoPadding", provider); 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()
|
D | MockCipherSpi.java | 28 import javax.crypto.Cipher; 166 if (opmode != Cipher.ENCRYPT_MODE) { in engineInit() 174 if (opmode != Cipher.ENCRYPT_MODE) { in engineInit() 182 if (opmode != Cipher.ENCRYPT_MODE) { in engineInit()
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | ProviderBenchmark.java | 21 import javax.crypto.Cipher; 26 Cipher c = Cipher.getInstance("RSA"); in timeStableProviders() 34 Cipher c = Cipher.getInstance("RSA"); in timeWithNewProvider()
|
D | CipherBenchmark.java | 24 import javax.crypto.Cipher; 92 private Cipher cipherEncrypt; 94 private Cipher cipherDecrypt; 127 cipherEncrypt = Cipher.getInstance(cipherAlgorithm, providerName); in setUp() 128 cipherEncrypt.init(Cipher.ENCRYPT_MODE, key, spec); in setUp() 130 cipherDecrypt = Cipher.getInstance(cipherAlgorithm, providerName); in setUp() 131 cipherDecrypt.init(Cipher.DECRYPT_MODE, key, spec); in setUp()
|
D | CipherInputStreamBenchmark.java | 23 import javax.crypto.Cipher; 53 private Cipher cipherEncrypt; 65 cipherEncrypt = Cipher.getInstance("AES/CBC/PKCS5Padding"); in setUp() 66 cipherEncrypt.init(Cipher.ENCRYPT_MODE, key, spec); in setUp() 71 cipherEncrypt.init(Cipher.ENCRYPT_MODE, key, spec); in timeEncrypt()
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/ |
D | CipherWrapThread.java | 22 import javax.crypto.Cipher; 37 Cipher cip = Cipher.getInstance(getAlgName()); in crypt() 39 cip.init(Cipher.WRAP_MODE, key); in crypt() 41 cip.init(Cipher.UNWRAP_MODE, key); in crypt() 42 Key decrypted = cip.unwrap(output, getAlgName(), Cipher.SECRET_KEY); in crypt()
|
D | CipherSymmetricKeyThread.java | 23 import javax.crypto.Cipher; 46 Cipher cip = Cipher.getInstance(getAlgName() + "/" + getMode() + "/" + 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()
|
D | CipherRSAThread.java | 22 import javax.crypto.Cipher; 40 Cipher cip = Cipher.getInstance(getAlgName() + "/" + getMode() + "/" + in crypt() 42 cip.init(Cipher.ENCRYPT_MODE, kp.getPublic()); in crypt() 45 cip.init(Cipher.DECRYPT_MODE, kp.getPrivate()); in crypt()
|
D | CipherPBEThread.java | 22 import javax.crypto.Cipher; 46 Cipher cip = Cipher.getInstance(getAlgName() + "/" + getMode() + "/" + in crypt() 52 cip.init(Cipher.ENCRYPT_MODE, key, parSpec); in crypt() 55 cip.init(Cipher.DECRYPT_MODE, key, parSpec); in crypt()
|
/libcore/luni/src/test/java/libcore/javax/crypto/spec/ |
D | AlgorithmParametersTestPBES2.java | 24 import javax.crypto.Cipher; 211 Cipher c = Cipher.getInstance("AES/CBC/PKCS5Padding", "BC"); 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() 245 Cipher c = Cipher.getInstance(algorithmName, "BC"); in test_encryptWithNoSalt() 246 c.init(Cipher.DECRYPT_MODE, key, new PBEParameterSpec(new byte[0], 1000)); in test_encryptWithNoSalt()
|
/libcore/ojluni/src/main/java/javax/crypto/ |
D | SealedObject.java | 146 public SealedObject(Serializable object, Cipher c) throws IOException, in SealedObject() 286 public final Object getObject(Cipher c) in getObject() 391 Cipher c; in unseal() 394 c = Cipher.getInstance(this.sealAlg, provider); in unseal() 396 c = Cipher.getInstance(this.sealAlg); in unseal() 411 c.init(Cipher.DECRYPT_MODE, key, params); in unseal() 413 c.init(Cipher.DECRYPT_MODE, key); in unseal()
|
D | EncryptedPrivateKeyInfo.java | 246 public PKCS8EncodedKeySpec getKeySpec(Cipher cipher) in getKeySpec() 265 Cipher c; in getKeySpecImpl() 269 c = Cipher.getInstance(algid.getName()); in getKeySpecImpl() 271 c = Cipher.getInstance(algid.getName(), provider); in getKeySpecImpl() 273 c.init(Cipher.DECRYPT_MODE, decryptKey, algid.getParameters()); in getKeySpecImpl()
|
D | Cipher.java | 255 public class Cipher { class 381 protected Cipher(CipherSpi cipherSpi, in Cipher() method in Cipher 400 private Cipher(CipherSpi cipherSpi, in Cipher() method in Cipher 616 public static final Cipher getInstance(String transformation) in getInstance() 661 public static final Cipher getInstance(String transformation, in getInstance() 710 public static final Cipher getInstance(String transformation, in getInstance() 720 static final Cipher createCipher(String transformation, Provider provider) in createCipher() 744 return new Cipher(null, provider, transformation, tokenizedTransformation); in createCipher() 1598 (((opmode == Cipher.ENCRYPT_MODE) && in init() 1601 ((opmode == Cipher.WRAP_MODE) && in init() [all …]
|
D | CipherOutputStream.java | 66 private Cipher cipher; 91 public CipherOutputStream(OutputStream os, Cipher c) { in CipherOutputStream()
|
/libcore/ojluni/annotations/mmodule/javax/crypto/ |
D | Cipher.annotated.java | 41 public class Cipher { class 43 protected Cipher(javax.crypto.CipherSpi cipherSpi, java.security.Provider provider, java.lang.Strin… in Cipher() method in Cipher 45 public static final javax.crypto.Cipher getInstance(java.lang.String transformation) throws java.se… in getInstance() 47 public static final javax.crypto.Cipher getInstance(java.lang.String transformation, java.lang.Stri… in getInstance() 49 public static final javax.crypto.Cipher getInstance(java.lang.String transformation, java.security.… in getInstance()
|
/libcore/ojluni/src/main/java/java/security/ |
D | Signature.java | 40 import javax.crypto.Cipher; 565 Cipher c = Cipher.getInstance(RSA_CIPHER, p); in getInstanceRSA() 1196 Cipher c = Cipher.getInstance(RSA_CIPHER, s.getProvider()); in newInstance() 1479 private final Cipher cipher; 1483 CipherAdapter(Cipher cipher) { in CipherAdapter() 1489 cipher.init(Cipher.DECRYPT_MODE, publicKey); in engineInitVerify() 1499 cipher.init(Cipher.ENCRYPT_MODE, privateKey); in engineInitSign() 1505 cipher.init(Cipher.ENCRYPT_MODE, privateKey, random); in engineInitSign()
|