/external/apache-harmony/crypto/src/test/impl/java/org/apache/harmony/crypto/tests/javax/crypto/ |
H A D | Cipher_ImplTest.java | 31 import javax.crypto.Cipher; 39 * Tests for <code>Cipher</code> class constructors and methods. 87 * Class under test for Cipher getInstance(String) 92 Cipher c = Cipher.getInstance("DES"); 97 * Class under test for Cipher getInstance(String) 102 Cipher c = Cipher.getInstance("DES/CBC/PKCS5Padding"); 107 c = Cipher.getInstance("DES/CBC/PKCS5Padding"); 112 * Class under test for Cipher getInstanc [all...] |
H A D | Cipher_Impl1Test.java | 25 import javax.crypto.Cipher; 46 * @tests javax.crypto.Cipher#getIV() 47 * @tests javax.crypto.Cipher#init(int, java.security.Key, 57 Cipher cipher = null; 64 cipher = Cipher.getInstance(algorithm + "/CBC/PKCS5Padding"); 65 cipher.init(Cipher.ENCRYPT_MODE, cipherKey, ap); 73 * @tests javax.crypto.Cipher#getParameters() 74 * @tests javax.crypto.Cipher#init(int, java.security.Key, 85 Cipher cipher = null; 96 cipher = Cipher [all...] |
/external/apache-harmony/crypto/src/test/api/java/org/apache/harmony/crypto/tests/javax/crypto/ |
H A D | CipherTest.java | 33 import javax.crypto.Cipher; 62 * @tests javax.crypto.Cipher#getInstance(java.lang.String) 65 Cipher cipher = Cipher.getInstance("DESede/CBC/PKCS5Padding"); 66 assertNotNull("Received a null Cipher instance", cipher); 70 * @tests javax.crypto.Cipher#getInstance(java.lang.String, 76 Provider[] providers = Security.getProviders("Cipher.DES"); 78 assertNotNull("No installed providers support Cipher.DES", providers); 81 Cipher cipher = Cipher [all...] |
H A D | CipherOutputStreamTest.java | 21 import javax.crypto.Cipher; 32 new CipherOutputStream((OutputStream) null, Cipher 42 new CipherOutputStream(ch, Cipher
|
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 | NullCipherTest.java | 27 import javax.crypto.Cipher; 38 private Cipher c; 73 c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(new byte[1], "algorithm")); 81 c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(new byte[1], 91 c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(new byte[1],
|
/external/apache-harmony/crypto/src/test/api/java.injected/javax/crypto/ |
H A D | SealedObjectTest.java | 31 import javax.crypto.Cipher; 71 * SealedObject(Serializable object, Cipher c) method testing. Tests if the 97 Cipher cipher = new NullCipher(); 111 * corresponding value of Cipher object. 119 Cipher cipher = Cipher.getInstance(algorithm); 120 cipher.init(Cipher.ENCRYPT_MODE, key); 139 Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding"); 140 cipher.init(Cipher [all...] |
H A D | CipherOutputStreamTest.java | 51 * CipherOutputStream uses NullCipher if Cipher is not specified 62 fail("NullCipher should be used " + "if Cipher is not specified."); 133 Cipher cf = Cipher.getInstance("DES/CBC/PKCS5Padding");
|
/external/chromium_org/content/public/android/javatests/src/org/chromium/content/browser/crypto/ |
H A D | CipherFactoryTest.java | 14 import javax.crypto.Cipher; 18 * well as that {@link Cipher} instances properly encrypt and decrypt data. 61 * {@link Cipher} instances initialized using the same parameters work in exactly the same way. 65 Cipher aEncrypt = CipherFactory.getInstance().getCipher(Cipher.ENCRYPT_MODE); 66 Cipher bEncrypt = CipherFactory.getInstance().getCipher(Cipher.ENCRYPT_MODE); 70 Cipher aDecrypt = CipherFactory.getInstance().getCipher(Cipher.DECRYPT_MODE); 71 Cipher bDecryp [all...] |
/external/chromium_org/third_party/tlslite/tlslite/utils/ |
H A D | pycrypto_rc4.py | 10 import Crypto.Cipher.ARC4 namespace 20 self.context = Crypto.Cipher.ARC4.new(key)
|
H A D | pycrypto_aes.py | 10 import Crypto.Cipher.AES namespace 21 self.context = Crypto.Cipher.AES.new(key, mode, IV)
|
H A D | pycrypto_tripledes.py | 10 import Crypto.Cipher.DES3 namespace 21 self.context = Crypto.Cipher.DES3.new(key, mode, IV)
|
/external/conscrypt/src/main/java/org/conscrypt/ |
H A D | CryptoUpcalls.java | 27 import javax.crypto.Cipher; 115 Provider p = getExternalProvider("Cipher." + RSA_CRYPTO_ALGORITHM); 120 Cipher c = null; 122 c = Cipher.getInstance(RSA_CRYPTO_ALGORITHM, p); 134 c.init(encrypt ? Cipher.ENCRYPT_MODE : Cipher.DECRYPT_MODE, javaKey);
|
H A D | OpenSSLCipherRSA.java | 38 import javax.crypto.Cipher; 155 if (opmode == Cipher.ENCRYPT_MODE || opmode == Cipher.WRAP_MODE) { 157 } else if (opmode == Cipher.DECRYPT_MODE || opmode == Cipher.UNWRAP_MODE) { 326 if (wrappedKeyType == Cipher.PUBLIC_KEY) { 329 } else if (wrappedKeyType == Cipher.PRIVATE_KEY) { 332 } else if (wrappedKeyType == Cipher.SECRET_KEY) {
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/ |
H A D | DefaultJcaJceHelper.java | 13 import javax.crypto.Cipher; 23 public Cipher createCipher( 27 return Cipher.getInstance(algorithm);
|
H A D | JcaJceHelper.java | 14 import javax.crypto.Cipher; 23 Cipher createCipher(
|
H A D | NamedJcaJceHelper.java | 14 import javax.crypto.Cipher; 31 public Cipher createCipher( 35 return Cipher.getInstance(algorithm, providerName);
|
H A D | ProviderJcaJceHelper.java | 14 import javax.crypto.Cipher; 31 public Cipher createCipher( 35 return Cipher.getInstance(algorithm, provider);
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/ |
H A D | BaseWrapCipher.java | 18 import javax.crypto.Cipher; 173 case Cipher.WRAP_MODE: 176 case Cipher.UNWRAP_MODE: 179 case Cipher.ENCRYPT_MODE: 180 case Cipher.DECRYPT_MODE: 337 if (wrappedKeyType == Cipher.SECRET_KEY) 341 else if (wrappedKeyAlgorithm.equals("") && wrappedKeyType == Cipher.PRIVATE_KEY) 373 if (wrappedKeyType == Cipher.PUBLIC_KEY) 377 else if (wrappedKeyType == Cipher.PRIVATE_KEY)
|
H A D | BaseStreamCipher.java | 11 import javax.crypto.Cipher; 221 if ((opmode == Cipher.ENCRYPT_MODE) || (opmode == Cipher.WRAP_MODE)) 239 case Cipher.ENCRYPT_MODE: 240 case Cipher.WRAP_MODE: 243 case Cipher.DECRYPT_MODE: 244 case Cipher.UNWRAP_MODE:
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jce/provider/ |
H A D | JCEStreamCipher.java | 18 import javax.crypto.Cipher; 247 if ((opmode == Cipher.ENCRYPT_MODE) || (opmode == Cipher.WRAP_MODE)) 263 case Cipher.ENCRYPT_MODE: 264 case Cipher.WRAP_MODE: 267 case Cipher.DECRYPT_MODE: 268 case Cipher.UNWRAP_MODE: 436 if (wrappedKeyType == Cipher.SECRET_KEY) 440 else if (wrappedKeyAlgorithm.equals("") && wrappedKeyType == Cipher.PRIVATE_KEY) 472 if (wrappedKeyType == Cipher [all...] |
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/util/ |
H A D | BaseCipherSpi.java | 15 import javax.crypto.Cipher; 159 if (wrappedKeyType == Cipher.SECRET_KEY) 163 else if (wrappedKeyAlgorithm.equals("") && wrappedKeyType == Cipher.PRIVATE_KEY) 195 if (wrappedKeyType == Cipher.PUBLIC_KEY) 199 else if (wrappedKeyType == Cipher.PRIVATE_KEY)
|
/external/chromium_org/content/public/android/java/src/org/chromium/content/browser/crypto/ |
H A D | CipherFactory.java | 21 import javax.crypto.Cipher; 27 * Generates {@link Cipher} instances for encrypting session data that is temporarily stored. 40 * - Encrypt data with a {@link Cipher} from {@link CipherFactory#getCipher(int)} before storing it. 41 * - Store {@link Cipher} parameters in the Bundle via {@link CipherFactory#saveToBundle(Bundle)}. 76 /** Used to generate data needed for the Cipher on a background thread. */ 91 * Creates a secure Cipher for encrypting data. 92 * This function blocks until data needed to generate a Cipher has been created by the 94 * @param opmode One of Cipher.{ENCRYPT,DECRYPT}_MODE. 95 * @return A Cipher, or null if it is not possible to instantiate one. 97 public Cipher getCiphe [all...] |
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/keystore/bc/ |
H A D | BcKeyStoreSpi.java | 31 import javax.crypto.Cipher; 151 Cipher cipher = makePBECipher(KEY_CIPHER, Cipher.ENCRYPT_MODE, password, salt, iterationCount); 229 Cipher cipher = makePBECipher(KEY_CIPHER, Cipher.DECRYPT_MODE, password, salt, iterationCount); 248 cipher = makePBECipher("Broken" + KEY_CIPHER, Cipher.DECRYPT_MODE, password, salt, iterationCount); 269 cipher = makePBECipher("Old" + KEY_CIPHER, Cipher.DECRYPT_MODE, password, salt, iterationCount); 288 Cipher out = makePBECipher(KEY_CIPHER, Cipher.ENCRYPT_MODE, password, salt, iterationCount); 454 protected Cipher makePBECiphe [all...] |
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/rsa/ |
H A D | CipherSpi.java | 18 import javax.crypto.Cipher; 104 throw new IllegalStateException("RSA Cipher not initialised"); 136 throw new IllegalStateException("RSA Cipher not initialised"); 255 if (privateKeyOnly && opmode == Cipher.ENCRYPT_MODE) 265 if (publicKeyOnly && opmode == Cipher.ENCRYPT_MODE) 333 case Cipher.ENCRYPT_MODE: 334 case Cipher.WRAP_MODE: 337 case Cipher.DECRYPT_MODE: 338 case Cipher.UNWRAP_MODE:
|