/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/ |
StreamBlockCipher.java | 10 private BlockCipher cipher; field in class:StreamBlockCipher 17 * @param cipher the block cipher to be wrapped. 18 * @exception IllegalArgumentException if the cipher has a block size other than 22 BlockCipher cipher) 24 if (cipher.getBlockSize() != 1) 26 throw new IllegalArgumentException("block cipher block size != 1."); 29 this.cipher = cipher; 33 * initialise the underlying cipher [all...] |
BufferedBlockCipher.java | 9 * Note: in the case where the underlying cipher is either a CFB cipher or an 18 protected BlockCipher cipher; field in class:BufferedBlockCipher 31 * Create a buffered block cipher without padding. 33 * @param cipher the underlying block cipher this buffering object wraps. 36 BlockCipher cipher) 38 this.cipher = cipher; 40 buf = new byte[cipher.getBlockSize()] [all...] |
/external/chromium/net/base/ |
ssl_cipher_suite_names_unittest.cc | 13 const char *key_exchange, *cipher, *mac; local 14 SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, 0xc001); 16 EXPECT_STREQ(cipher, "NULL"); 19 SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, 0xff31); 21 EXPECT_STREQ(cipher, "???");
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/modes/ |
CFBBlockCipher.java | 9 * implements a Cipher-FeedBack (CFB) mode on top of a simple cipher. 19 private BlockCipher cipher = null; field in class:CFBBlockCipher 25 * @param cipher the block cipher to be used as the basis of the 30 BlockCipher cipher, 33 this.cipher = cipher; 36 this.IV = new byte[cipher.getBlockSize()]; 37 this.cfbV = new byte[cipher.getBlockSize()] [all...] |
OFBBlockCipher.java | 9 * implements a Output-FeedBack (OFB) mode on top of a simple cipher. 19 private final BlockCipher cipher; field in class:OFBBlockCipher 24 * @param cipher the block cipher to be used as the basis of the 29 BlockCipher cipher, 32 this.cipher = cipher; 35 this.IV = new byte[cipher.getBlockSize()]; 36 this.ofbV = new byte[cipher.getBlockSize()]; 37 this.ofbOutV = new byte[cipher.getBlockSize()] [all...] |
SICBlockCipher.java | 10 * block cipher. This mode is also known as CTR mode. 15 private final BlockCipher cipher; field in class:SICBlockCipher 26 * @param c the block cipher to be used. 30 this.cipher = c; 31 this.blockSize = cipher.getBlockSize(); 39 * return the underlying block cipher that we are wrapping. 41 * @return the underlying block cipher that we are wrapping. 45 return cipher; 65 cipher.init(true, ivParam.getParameters()); 76 return cipher.getAlgorithmName() + "/SIC" [all...] |
CBCBlockCipher.java | 10 * implements Cipher-Block-Chaining (CBC) mode on top of a simple cipher. 20 private BlockCipher cipher = null; field in class:CBCBlockCipher 26 * @param cipher the block cipher to be used as the basis of chaining. 29 BlockCipher cipher) 31 this.cipher = cipher; 32 this.blockSize = cipher.getBlockSize(); 40 * return the underlying block cipher that we are wrapping [all...] |
/libcore/support/src/test/java/tests/security/ |
CipherHelper.java | 23 import javax.crypto.Cipher; 43 Cipher cipher = null; local 45 cipher = Cipher.getInstance(algorithmName); 52 cipher.init(mode1, encryptKey); 57 byte[] encrypted = crypt(cipher, plainData.getBytes()); 60 cipher.init(mode2, decryptKey); 65 byte[] decrypted = crypt(cipher, encrypted); 73 public byte[] crypt(Cipher cipher, byte[] input) [all...] |
AlgorithmParameterAsymmetricHelper.java | 27 import javax.crypto.Cipher; 56 Cipher cipher = null; local 58 cipher = Cipher.getInstance(algorithmName); 66 cipher.init(Cipher.ENCRYPT_MODE, keyPair.getPublic(), parameters); 75 bs = cipher.doFinal(plainData.getBytes()); 83 cipher.init(Cipher.DECRYPT_MODE, keyPair.getPrivate(), parameters) [all...] |
AlgorithmParameterSymmetricHelper.java | 26 import javax.crypto.Cipher; 64 Cipher cipher = null; local 71 cipher = Cipher.getInstance(transformation); 79 cipher.init(Cipher.ENCRYPT_MODE, key, parameters); 88 bs = cipher.doFinal(plainData.getBytes()); 96 cipher.init(Cipher.DECRYPT_MODE, key, parameters) [all...] |
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/macs/ |
CBCBlockCipherMac.java | 10 * standard CBC Block Cipher MAC - if no padding is specified the default of 20 private BlockCipher cipher; field in class:CBCBlockCipherMac 26 * create a standard MAC based on a CBC block cipher. This will produce an 27 * authentication code half the length of the block size of the cipher. 29 * @param cipher the cipher to be used as the basis of the MAC generation. 32 BlockCipher cipher) 34 this(cipher, (cipher.getBlockSize() * 8) / 2, null); 38 * create a standard MAC based on a CBC block cipher. This will produce a [all...] |
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/ |
BaseStreamCipher.java | 10 import javax.crypto.Cipher; 47 private StreamCipher cipher; field in class:BaseStreamCipher 59 cipher = engine; 69 cipher = new StreamBlockCipher(engine); 184 param = PBE.Util.makePBEParameters(k, params, cipher.getAlgorithmName()); 220 if ((opmode == Cipher.ENCRYPT_MODE) || (opmode == Cipher.WRAP_MODE)) 236 case Cipher.ENCRYPT_MODE: 237 case Cipher.WRAP_MODE: 238 cipher.init(true, param) [all...] |
/external/chromium_org/net/ssl/ |
ssl_cipher_suite_names_unittest.cc | 15 const char *key_exchange, *cipher, *mac; local 18 SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, &is_aead, 0xc001); 20 EXPECT_STREQ("NULL", cipher); 24 SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, &is_aead, 0x009f); 26 EXPECT_STREQ("AES_256_GCM", cipher); 30 SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, &is_aead, 0xff31); 32 EXPECT_STREQ("???", cipher);
|
/external/ganymed-ssh2/src/main/java/ch/ethz/ssh2/crypto/cipher/ |
BlockCipher.java | 5 package ch.ethz.ssh2.crypto.cipher;
|
DESede.java | 1 package ch.ethz.ssh2.crypto.cipher; 52 * initialise a DES cipher. 57 * the parameters required to set up the cipher.
|
NullCipher.java | 5 package ch.ethz.ssh2.crypto.cipher;
|
/external/apache-harmony/crypto/src/test/impl/java/org/apache/harmony/crypto/tests/javax/crypto/ |
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; local 64 cipher = Cipher.getInstance(algorithm + "/CBC/PKCS5Padding"); 65 cipher.init(Cipher.ENCRYPT_MODE, cipherKey, ap); 67 byte[] cipherIV = cipher.getIV() 85 Cipher cipher = null; local [all...] |
/libcore/crypto/src/main/java/org/conscrypt/ |
DigitalSignature.java | 29 import javax.crypto.Cipher; 62 private final Cipher cipher; field in class:DigitalSignature 77 cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding"); 82 cipher = null; 85 cipher = null; 106 } else if (cipher != null) { 107 cipher.init(Cipher.ENCRYPT_MODE, key) [all...] |
/libcore/luni/src/main/java/javax/crypto/ |
CipherInputStream.java | 27 * This class wraps an {@code InputStream} and a cipher so that {@code read()} 29 * processed by the cipher. 31 * The cipher must be initialized for the requested operation before being used 32 * by a {@code CipherInputStream}. For example, if a cipher initialized for 40 private final Cipher cipher; field in class:CipherInputStream 49 * InputStream} and a cipher. 58 * the cipher to process the data with. 60 public CipherInputStream(InputStream is, Cipher c) { 62 this.cipher = c [all...] |
SealedObject.java | 35 * instance and encrypts it using a cryptographic cipher. 42 * object itself keeps track of the cipher and corresponding parameters. 49 * The cipher's {@link AlgorithmParameters} in encoded format. 50 * Equivalent to {@code cipher.getParameters().getEncoded()}, 51 * or null if the cipher did not use any parameters. 72 * and sealing it using the specified cipher. 74 * The cipher must be fully initialized. 79 * the cipher to encrypt the object. 83 * if the specified cipher is a block cipher and the length o 159 Cipher cipher = Cipher.getInstance(sealAlg); local 254 Cipher cipher = Cipher.getInstance(sealAlg, provider); local [all...] |
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jce/provider/ |
JCEStreamCipher.java | 18 import javax.crypto.Cipher; 72 private StreamCipher cipher; field in class:JCEStreamCipher 86 cipher = engine; 96 cipher = new StreamBlockCipher(engine); 211 param = PBE.Util.makePBEParameters(k, params, cipher.getAlgorithmName()); 247 if ((opmode == Cipher.ENCRYPT_MODE) || (opmode == Cipher.WRAP_MODE)) 263 case Cipher.ENCRYPT_MODE: 264 case Cipher.WRAP_MODE: 265 cipher.init(true, param) [all...] |
/external/chromium/crypto/ |
symmetric_key_nss.cc | 86 CK_MECHANISM_TYPE cipher = local 95 ScopedPK11Slot slot(PK11_GetBestSlot(cipher, NULL)); 102 PK11SymKey* sym_key = PK11_ImportSymKey(slot.get(), cipher, PK11_OriginUnwrap,
|
/external/chromium_org/crypto/ |
symmetric_key_nss.cc | 87 CK_MECHANISM_TYPE cipher = local 103 PK11SymKey* sym_key = PK11_ImportSymKey(slot.get(), cipher, PK11_OriginUnwrap,
|
/external/chromium_org/third_party/openssl/openssl/crypto/pkcs7/ |
enc.c | 77 const EVP_CIPHER *cipher=NULL; local 91 if(!(cipher = EVP_get_cipherbyname(argv[2]))) { 92 fprintf(stderr, "Unknown cipher %s\n", argv[2]); 130 if(!cipher) { 132 cipher = EVP_des_ede3_cbc(); 134 fprintf(stderr, "No cipher selected\n"); 139 if (!PKCS7_set_cipher(p7,cipher)) goto err;
|
/external/openssl/crypto/pkcs7/ |
enc.c | 77 const EVP_CIPHER *cipher=NULL; local 91 if(!(cipher = EVP_get_cipherbyname(argv[2]))) { 92 fprintf(stderr, "Unknown cipher %s\n", argv[2]); 130 if(!cipher) { 132 cipher = EVP_des_ede3_cbc(); 134 fprintf(stderr, "No cipher selected\n"); 139 if (!PKCS7_set_cipher(p7,cipher)) goto err;
|