Home
last modified time | relevance | path

Searched refs:ENCRYPT_MODE (Results 1 – 21 of 21) sorted by relevance

/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 …]
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()
298 cipher.init(Cipher.ENCRYPT_MODE, key); in testGetObject3()
331 cipher.init(Cipher.ENCRYPT_MODE, key); in testDeserialization()
DNullCipherTest.java76 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()
DCipherOutputStream1Test.java209 c.init(Cipher.ENCRYPT_MODE, key); in test_ConstructorLjava_io_OutputStreamLjavax_crypto_Cipher()
319 cipherThatThrowsOnSecondDoFinal.init(Cipher.ENCRYPT_MODE, (Key) null); in test_close_doubleCloseDoesntCallDoFinal()
DCipherInputStream1Test.java260 c.init(Cipher.ENCRYPT_MODE, key); in test_ConstructorLjava_io_InputStreamLjavax_crypto_Cipher()
DEncryptedPrivateKeyInfoTest.java1656 c.init(Cipher.ENCRYPT_MODE, k); in TestDataGenerator()
1658 c.init(Cipher.ENCRYPT_MODE, k, pbeParamSpec); in TestDataGenerator()
/libcore/luni/src/test/java/libcore/javax/crypto/
DCipherTest.java78 c.init(Cipher.ENCRYPT_MODE, new MockKey()); in testCipher_getInstance_SuppliedProviderNotRegistered_Success()
95 c.init(Cipher.ENCRYPT_MODE, new MockKey()); in testCipher_getInstance_DoesNotSupportKeyClass_Success()
113 c.init(Cipher.ENCRYPT_MODE, new MockKey()); in testCipher_getInstance_SuppliedProviderNotRegistered_MultipartTransform_Success()
171 c.init(Cipher.ENCRYPT_MODE, new MockKey()); in testCipher_getInstance_DelayedInitialization_KeyType()
175 c.init(Cipher.ENCRYPT_MODE, new MockKey2()); in testCipher_getInstance_DelayedInitialization_KeyType()
189 c.init(Cipher.ENCRYPT_MODE, new Key() { in testCipher_getInstance_DelayedInitialization_KeyType()
303 c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(new byte[16], "FOO")); in testCipher_getInstance_WrongType_Failure()
331 c.init(Cipher.ENCRYPT_MODE, new MockKey(), new IvParameterSpec(new byte[12])); in testCipher_init_CallsInitWithParams_AlgorithmParameterSpec()
359 c.init(Cipher.ENCRYPT_MODE, new MockKey(), AlgorithmParameters.getInstance("AES")); in testCipher_init_CallsInitWithParams_AlgorithmParameters()
387 c.init(Cipher.ENCRYPT_MODE, new MockKey(), AlgorithmParameters.getInstance("AES")); in testCipher_init_CallsInitIgnoresRuntimeException()
[all …]
DCipherOutputStreamTest.java60 cipher.init(Cipher.ENCRYPT_MODE, key); in testDecryptCorruptGCM()
62 cipher.init(Cipher.ENCRYPT_MODE, key, params); in testDecryptCorruptGCM()
DMockCipherSpi.java166 if (opmode != Cipher.ENCRYPT_MODE) { in engineInit()
174 if (opmode != Cipher.ENCRYPT_MODE) { in engineInit()
182 if (opmode != Cipher.ENCRYPT_MODE) { in engineInit()
DCipherInputStreamTest.java133 cipher.init(Cipher.ENCRYPT_MODE, key, iv); in testEncrypt()
145 cipher.init(Cipher.ENCRYPT_MODE, rc4Key); in testEncrypt_RC4()
317 cipher.init(Cipher.ENCRYPT_MODE, key); in testDecryptCorruptGCM()
319 cipher.init(Cipher.ENCRYPT_MODE, key, params); in testDecryptCorruptGCM()
/libcore/benchmarks/src/benchmarks/regression/
DCipherInputStreamBenchmark.java66 cipherEncrypt.init(Cipher.ENCRYPT_MODE, key, spec); in setUp()
71 cipherEncrypt.init(Cipher.ENCRYPT_MODE, key, spec); in timeEncrypt()
DCipherBenchmark.java128 cipherEncrypt.init(Cipher.ENCRYPT_MODE, key, spec); in setUp()
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/
DCipherSymmetricKeyThread.java56 cip.init(Cipher.ENCRYPT_MODE, key, ivspec); in crypt()
64 cip.init(Cipher.ENCRYPT_MODE, key); in crypt()
DCipherRSAThread.java42 cip.init(Cipher.ENCRYPT_MODE, kp.getPublic()); in crypt()
DCipherPBEThread.java52 cip.init(Cipher.ENCRYPT_MODE, key, parSpec); in crypt()
/libcore/ojluni/src/main/java/javax/crypto/
DCipher.java302 public static final int ENCRYPT_MODE = 1; field in Cipher
1030 if ((opmode < ENCRYPT_MODE) || (opmode > UNWRAP_MODE)) { in checkOpmode()
1037 case ENCRYPT_MODE: in getOpmodeString()
1617 (((opmode == Cipher.ENCRYPT_MODE) && in init()
1661 if ((opmode != Cipher.ENCRYPT_MODE) && in checkCipherState()
/libcore/luni/src/test/java/tests/targets/security/
DKeyStorePkcs7FormatTest.java147 cipher.init(Cipher.ENCRYPT_MODE, privateKey); in keystoreIsReadableAndConsistent()
/libcore/luni/src/test/java/libcore/javax/crypto/spec/
DAlgorithmParametersTestPBES2.java212 c.init(Cipher.ENCRYPT_MODE, key, ap); in test_encryptWithAlgorithmParameters()
/libcore/ojluni/src/main/java/java/security/
DSignature.java1503 cipher.init(Cipher.ENCRYPT_MODE, privateKey); in engineInitSign()
1509 cipher.init(Cipher.ENCRYPT_MODE, privateKey, random); in engineInitSign()
/libcore/ojluni/annotations/mmodule/javax/crypto/
DCipher.annotated.java128 public static final int ENCRYPT_MODE = 1; // 0x1 field in Cipher
/libcore/api/
Dcurrent.txt18963 field public static final int ENCRYPT_MODE = 1; // 0x1