/libcore/support/src/test/java/tests/security/ |
H A D | CipherAsymmetricCryptHelper.java | 20 import javax.crypto.Cipher; 27 super(algorithmName, plainData, Cipher.ENCRYPT_MODE, 28 Cipher.DECRYPT_MODE);
|
H A D | CipherSymmetricCryptHelper.java | 19 import javax.crypto.Cipher; 27 super(algorithmName, plainData, Cipher.ENCRYPT_MODE, 28 Cipher.DECRYPT_MODE);
|
H A D | CipherHelper.java | 23 import javax.crypto.Cipher; 43 Cipher cipher = null; 45 cipher = Cipher.getInstance(algorithmName); 73 public byte[] crypt(Cipher cipher, byte[] input) {
|
H A D | AlgorithmParameterAsymmetricHelper.java | 27 import javax.crypto.Cipher; 56 Cipher cipher = null; 58 cipher = Cipher.getInstance(algorithmName); 66 cipher.init(Cipher.ENCRYPT_MODE, keyPair.getPublic(), parameters); 83 cipher.init(Cipher.DECRYPT_MODE, keyPair.getPrivate(), parameters);
|
H A D | AlgorithmParameterSymmetricHelper.java | 26 import javax.crypto.Cipher; 64 Cipher cipher = null; 71 cipher = Cipher.getInstance(transformation); 79 cipher.init(Cipher.ENCRYPT_MODE, key, parameters); 96 cipher.init(Cipher.DECRYPT_MODE, key, parameters);
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ |
H A D | CipherTest.java | 45 import javax.crypto.Cipher; 86 * javax.crypto.Cipher#getInstance(java.lang.String) 89 Cipher cipher = Cipher.getInstance("DESede/CBC/PKCS5Padding"); 90 assertNotNull("Received a null Cipher instance", cipher); 93 Cipher.getInstance("WrongAlgorithmName"); 100 * javax.crypto.Cipher#getInstance(java.lang.String, 106 Provider[] providers = Security.getProviders("Cipher.DES"); 108 assertNotNull("No installed providers support Cipher.DES", providers); 111 Cipher ciphe [all...] |
H A D | CipherOutputStreamTest.java | 21 import javax.crypto.Cipher; 32 new CipherOutputStream((OutputStream) null, Cipher 41 new CipherOutputStream(ch, Cipher
|
H A D | SealedObjectTest.java | 38 import javax.crypto.Cipher; 50 public Mock_SealedObject(Serializable object, Cipher c) 88 * SealedObject(Serializable object, Cipher c) method testing. Tests if the 106 Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding"); 107 cipher.init(Cipher.ENCRYPT_MODE, key, ips); 111 cipher = Cipher.getInstance("DES/CBC/NoPadding"); 112 cipher.init(Cipher.ENCRYPT_MODE, key, ips); 135 Cipher cipher = new NullCipher(); 149 * corresponding value of Cipher objec [all...] |
H A D | CipherInputStreamTest.java | 26 import javax.crypto.Cipher; 53 Cipher.getInstance("DES/CBC/PKCS5Padding")).close(); 60 Cipher.getInstance("DES/CBC/PKCS5Padding")).close();
|
H A D | CipherOutputStream1Test.java | 39 import javax.crypto.Cipher; 61 * CipherOutputStream uses NullCipher if Cipher is not specified 72 fail("NullCipher should be used " + "if Cipher is not specified."); 150 Cipher cf = Cipher.getInstance("DES/CBC/PKCS5Padding"); 201 Cipher c = Cipher.getInstance("DES/CBC/NoPadding"); 202 c.init(Cipher.ENCRYPT_MODE, key);
|
H A D | NullCipherTest.java | 28 import javax.crypto.Cipher; 41 private Cipher c; 76 c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(new byte[1], "algorithm")); 84 c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(new byte[1], 93 c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(new byte[1],
|
/libcore/luni/src/test/java/libcore/javax/crypto/ |
H A D | CipherTest.java | 22 import javax.crypto.Cipher; 42 // corresponds to this in Cipher, the RI does not enforce 43 // anything in Cipher. 64 assertCipherInitWithKeyUsage(certificate, allowEncrypt, Cipher.ENCRYPT_MODE); 65 assertCipherInitWithKeyUsage(certificate, allowDecrypt, Cipher.DECRYPT_MODE); 66 assertCipherInitWithKeyUsage(certificate, allowWrap, Cipher.WRAP_MODE); 67 assertCipherInitWithKeyUsage(certificate, allowUnwrap, Cipher.UNWRAP_MODE); 73 Cipher cipher = Cipher.getInstance("RSA"); 81 case Cipher [all...] |
H A D | CipherInputStreamTest.java | 24 import javax.crypto.Cipher; 42 Cipher cipher = Cipher.getInstance("DES"); 43 cipher.init(Cipher.ENCRYPT_MODE, key); 51 Cipher cipher = Cipher.getInstance("DES"); 52 cipher.init(Cipher.DECRYPT_MODE, key); 59 Cipher cipher = Cipher.getInstance("DES"); 60 cipher.init(Cipher [all...] |
/libcore/luni/src/main/java/javax/crypto/ |
H A D | NullCipher.java | 35 public class NullCipher extends Cipher { 43 this.init(Cipher.ENCRYPT_MODE, (Key)null, (SecureRandom)null);
|
H A D | SealedObject.java | 83 public SealedObject(Serializable object, Cipher c) 153 Cipher cipher = Cipher.getInstance(sealAlg); 158 cipher.init(Cipher.DECRYPT_MODE, key, params); 160 cipher.init(Cipher.DECRYPT_MODE, key); 207 public final Object getObject(Cipher c) 248 Cipher cipher = Cipher.getInstance(sealAlg, provider); 253 cipher.init(Cipher.DECRYPT_MODE, key, params); 255 cipher.init(Cipher [all...] |
H A D | EncryptedPrivateKeyInfo.java | 227 * The cipher must be initialize in either {@code Cipher.DECRYPT_MODE} or 228 * {@code Cipher.UNWRAP_MODE} with the same parameters and key used for 240 public PKCS8EncodedKeySpec getKeySpec(Cipher cipher) 284 Cipher cipher = Cipher.getInstance(algName); 286 cipher.init(Cipher.DECRYPT_MODE, decryptKey); 288 cipher.init(Cipher.DECRYPT_MODE, decryptKey, algParameters); 343 Cipher cipher = Cipher.getInstance(algName, providerName); 345 cipher.init(Cipher [all...] |
H A D | CipherOutputStream.java | 37 private final Cipher cipher; 41 * OutputStream} and a {@code Cipher}. 48 public CipherOutputStream(OutputStream os, Cipher c) {
|
H A D | CipherInputStream.java | 40 private final Cipher cipher; 59 public CipherInputStream(InputStream is, Cipher c) {
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/ |
H A D | CipherWrapThread.java | 22 import javax.crypto.Cipher; 37 Cipher cip = Cipher.getInstance(getAlgName()); 39 cip.init(Cipher.WRAP_MODE, key); 41 cip.init(Cipher.UNWRAP_MODE, key); 42 Key decrypted = cip.unwrap(output, getAlgName(), Cipher.SECRET_KEY);
|
H A D | CipherSymmetricKeyThread.java | 23 import javax.crypto.Cipher; 46 Cipher cip = Cipher.getInstance(getAlgName() + "/" + getMode() + "/" + 56 cip.init(Cipher.ENCRYPT_MODE, key, ivspec); 61 cip.init(Cipher.DECRYPT_MODE, key, ivspec); 64 cip.init(Cipher.ENCRYPT_MODE, key); 67 cip.init(Cipher.DECRYPT_MODE, key);
|
H A D | CipherPBEThread.java | 22 import javax.crypto.Cipher; 46 Cipher cip = Cipher.getInstance(getAlgName() + "/" + getMode() + "/" + 52 cip.init(Cipher.ENCRYPT_MODE, key, parSpec); 55 cip.init(Cipher.DECRYPT_MODE, key, parSpec);
|
H A D | CipherRSAThread.java | 22 import javax.crypto.Cipher; 40 Cipher cip = Cipher.getInstance(getAlgName() + "/" + getMode() + "/" + 42 cip.init(Cipher.ENCRYPT_MODE, kp.getPublic()); 45 cip.init(Cipher.DECRYPT_MODE, kp.getPrivate());
|
/libcore/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ |
H A D | ConnectionState.java | 20 import javax.crypto.Cipher; 31 protected Cipher encCipher; 36 protected Cipher decCipher; 64 * Generic[Stream|Generic]Cipher structure under this 73 * Returns the size of the Generic[Stream|Generic]Cipher structure 82 * into the Generic[Stream|Generic]Cipher structure of specified size.
|
H A D | DigitalSignature.java | 29 import javax.crypto.Cipher; 62 private final Cipher cipher; 77 cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding"); 107 cipher.init(Cipher.ENCRYPT_MODE, key); 124 cipher.init(Cipher.DECRYPT_MODE, cert);
|
H A D | ConnectionStateSSLv3.java | 23 import javax.crypto.Cipher; 181 encCipher = Cipher.getInstance(algName); 182 decCipher = Cipher.getInstance(algName); 184 encCipher.init(Cipher.ENCRYPT_MODE, 187 decCipher.init(Cipher.DECRYPT_MODE, 191 encCipher.init(Cipher.ENCRYPT_MODE, 194 decCipher.init(Cipher.DECRYPT_MODE, 291 // plain data of the Generic[Stream|Block]Cipher structure
|