/external/srtp/doc/ |
crypto_kernel.txt | 14 @brief A generic cipher type enables cipher agility, that is, the 15 ability to write code that runs with multiple cipher types. 24 * @brief Allocates a cipher of a particular type. 28 cipher_type_alloc(cipher_type_t *ctype, cipher_t **cipher, 32 * @brief Initialized a cipher to use a particular key. May 33 * be invoked more than once on the same cipher. 38 cipher_init(cipher_t *cipher, const uint8_t *key); 41 * @brief Sets the initialization vector of a given cipher. 46 cipher_set_iv(cipher_t *cipher, void *iv) [all...] |
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ |
CipherTest.java | 45 import javax.crypto.Cipher; 86 * javax.crypto.Cipher#getInstance(java.lang.String) 89 Cipher cipher = Cipher.getInstance("DESede/CBC/PKCS5Padding"); local 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") 111 Cipher cipher = Cipher.getInstance("DES", providers[i].getName()); local 145 Cipher cipher = Cipher.getInstance("DES", providers[i]); local 173 Cipher cipher = Cipher.getInstance("AES", provider.getName()); local 187 Cipher cipher = Cipher.getInstance(algorithm); local 198 Cipher cipher = Cipher.getInstance(algorithm); local 208 Cipher cipher = Cipher.getInstance(algorithm + "\/ECB\/PKCS5Padding"); local 231 Cipher cipher = Cipher.getInstance(algorithm + "\/ECB\/PKCS5Padding"); local 249 Cipher cipher = Cipher.getInstance(algorithm + "\/ECB\/PKCS5Padding"); local 266 Cipher cipher = null; local 307 Cipher cipher = null; local 390 Cipher cipher = Cipher.getInstance("DESEDE\/CBC\/PKCS5Padding"); local 1175 Cipher cipher = Cipher.getInstance("DESEDE\/CBC\/PKCS5Padding"); local [all...] |
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 89 * NullPointerException is thrown in the case of null cipher. 96 + "of null cipher."); 106 Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding"); local 107 cipher.init(Cipher.ENCRYPT_MODE, key, ips) 135 Cipher cipher = new NullCipher(); local 157 Cipher cipher = Cipher.getInstance(algorithm); local 177 Cipher cipher = Cipher.getInstance("DES\/CBC\/PKCS5Padding"); local 221 Cipher cipher = Cipher.getInstance("DES\/CBC\/PKCS5Padding"); local 265 Cipher cipher = Cipher.getInstance("DES"); local [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/apache-harmony/crypto/src/test/impl/java/org/apache/harmony/crypto/tests/javax/crypto/ |
Cipher_ImplTest.java | 31 import javax.crypto.Cipher; 39 * Tests for <code>Cipher</code> class constructors and methods. 88 * Class under test for Cipher getInstance(String) 93 Cipher c = Cipher.getInstance("DES"); 98 * Class under test for Cipher getInstance(String) 103 Cipher c = Cipher.getInstance("DES/CBC/PKCS5Padding"); 108 c = Cipher.getInstance("DES/CBC/PKCS5Padding"); 113 * Class under test for Cipher getInstance(String [all...] |
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/luni/src/test/java/libcore/javax/crypto/ |
CipherInputStreamTest.java | 24 import javax.crypto.Cipher; 42 Cipher cipher = Cipher.getInstance("DES"); local 43 cipher.init(Cipher.ENCRYPT_MODE, key); 45 new ByteArrayInputStream(plainText.getBytes("UTF-8")), cipher); 51 Cipher cipher = Cipher.getInstance("DES") local 59 Cipher cipher = Cipher.getInstance("DES"); local [all...] |
/external/bouncycastle/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/apache-harmony/crypto/src/test/api/java/org/apache/harmony/crypto/tests/javax/crypto/ |
CipherTest.java | 33 import javax.crypto.Cipher; 62 * @tests javax.crypto.Cipher#getInstance(java.lang.String) 65 Cipher cipher = Cipher.getInstance("DESede/CBC/PKCS5Padding"); local 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.getInstance("DES", providers[i].getName()); local 122 Cipher cipher = Cipher.getInstance("DES", providers[i]); local 138 Cipher cipher = Cipher.getInstance("AES", provider.getName()); local 152 Cipher cipher = Cipher.getInstance(algorithm); local 163 Cipher cipher = Cipher.getInstance(algorithm); local 173 Cipher cipher = Cipher.getInstance(algorithm + "\/ECB\/PKCS5Padding"); local 189 Cipher cipher = Cipher.getInstance(algorithm + "\/ECB\/PKCS5Padding"); local 200 Cipher cipher = Cipher.getInstance(algorithm + "\/ECB\/PKCS5Padding"); local 211 Cipher cipher = null; local 237 Cipher cipher = null; local [all...] |
/external/bouncycastle/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...] |
BlockCipher.java | 5 * Block cipher engines are expected to conform to this interface. 10 * Initialise the cipher. 12 * @param forEncryption if true the cipher is initialised for 14 * @param params the key and other data required by the cipher. 22 * Return the name of the algorithm the cipher implements. 24 * @return the name of the algorithm the cipher implements. 29 * Return the block size for this cipher (in bytes). 31 * @return the block size for this cipher in bytes. 45 * @exception IllegalStateException if the cipher isn't initialised. 52 * Reset the cipher. After resetting the cipher is in the same stat [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...] |
/external/dropbear/libtomcrypt/src/modes/ecb/ |
ecb_start.c | 23 @param cipher The index of the cipher desired 26 @param num_rounds Number of rounds in the cipher desired (0 for default) 30 int ecb_start(int cipher, const unsigned char *key, int keylen, int num_rounds, symmetric_ECB *ecb) 36 if ((err = cipher_is_valid(cipher)) != CRYPT_OK) { 39 ecb->cipher = cipher; 40 ecb->blocklen = cipher_descriptor[cipher].block_length; 41 return cipher_descriptor[cipher].setup(key, keylen, num_rounds, &ecb->key);
|
ecb_decrypt.c | 24 @param len The number of octets to process (must be multiple of the cipher block size) 34 if ((err = cipher_is_valid(ecb->cipher)) != CRYPT_OK) { 37 if (len % cipher_descriptor[ecb->cipher].block_length) { 42 if (cipher_descriptor[ecb->cipher].accel_ecb_decrypt != NULL) { 43 return cipher_descriptor[ecb->cipher].accel_ecb_decrypt(ct, pt, len / cipher_descriptor[ecb->cipher].block_length, &ecb->key); 46 if ((err = cipher_descriptor[ecb->cipher].ecb_decrypt(ct, pt, &ecb->key)) != CRYPT_OK) { 49 pt += cipher_descriptor[ecb->cipher].block_length; 50 ct += cipher_descriptor[ecb->cipher].block_length; 51 len -= cipher_descriptor[ecb->cipher].block_length [all...] |
ecb_encrypt.c | 24 @param len The number of octets to process (must be multiple of the cipher block size) 34 if ((err = cipher_is_valid(ecb->cipher)) != CRYPT_OK) { 37 if (len % cipher_descriptor[ecb->cipher].block_length) { 42 if (cipher_descriptor[ecb->cipher].accel_ecb_encrypt != NULL) { 43 return cipher_descriptor[ecb->cipher].accel_ecb_encrypt(pt, ct, len / cipher_descriptor[ecb->cipher].block_length, &ecb->key); 46 if ((err = cipher_descriptor[ecb->cipher].ecb_encrypt(pt, ct, &ecb->key)) != CRYPT_OK) { 49 pt += cipher_descriptor[ecb->cipher].block_length; 50 ct += cipher_descriptor[ecb->cipher].block_length; 51 len -= cipher_descriptor[ecb->cipher].block_length [all...] |
/external/srtp/crypto/include/ |
aes_cbc.h | 4 * Header for AES Cipher Blobk Chaining Mode. 15 #include "cipher.h" 18 v128_t state; /* cipher chaining state */ 20 aes_expanded_key_t expanded_key; /* the cipher key */
|
/external/apache-harmony/crypto/src/test/api/java.injected/javax/crypto/ |
SealedObjectTest.java | 31 import javax.crypto.Cipher; 71 * SealedObject(Serializable object, Cipher c) method testing. Tests if the 72 * NullPointerException is thrown in the case of null cipher. 79 + "of null cipher."); 97 Cipher cipher = new NullCipher(); local 98 SealedObject so1 = new SealedObject(secret, cipher); 103 .getObject(cipher)); 111 * corresponding value of Cipher object. 119 Cipher cipher = Cipher.getInstance(algorithm) local 139 Cipher cipher = Cipher.getInstance("DES\/CBC\/PKCS5Padding"); local 174 Cipher cipher = Cipher.getInstance("DES\/CBC\/PKCS5Padding"); local 212 Cipher cipher = Cipher.getInstance("DES"); local [all...] |
/external/dropbear/libtomcrypt/src/mac/xcbc/ |
xcbc_init.c | 22 @param cipher Index of cipher to use 27 int xcbc_init(xcbc_state *xcbc, int cipher, const unsigned char *key, unsigned long keylen) 36 if ((err = cipher_is_valid(cipher)) != CRYPT_OK) { 41 if (cipher_descriptor[cipher].block_length % sizeof(LTC_FAST_TYPE)) { 52 if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, skey)) != CRYPT_OK) { 58 for (x = 0; x < cipher_descriptor[cipher].block_length; x++) { 61 cipher_descriptor[cipher].ecb_encrypt(xcbc->K[y], xcbc->K[y], skey); 65 err = cipher_descriptor[cipher].setup(xcbc->K[0], cipher_descriptor[cipher].block_length, 0, &xcbc->key) [all...] |
/external/dropbear/libtomcrypt/src/mac/f9/ |
f9_init.c | 22 @param cipher Index of cipher to use 27 int f9_init(f9_state *f9, int cipher, const unsigned char *key, unsigned long keylen) 35 if ((err = cipher_is_valid(cipher)) != CRYPT_OK) { 40 if (cipher_descriptor[cipher].block_length % sizeof(LTC_FAST_TYPE)) { 45 if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, &f9->key)) != CRYPT_OK) { 55 zeromem(f9->IV, cipher_descriptor[cipher].block_length); 56 zeromem(f9->ACC, cipher_descriptor[cipher].block_length); 57 f9->blocksize = cipher_descriptor[cipher].block_length; 58 f9->cipher = cipher [all...] |
/external/dropbear/libtomcrypt/src/modes/cfb/ |
cfb_start.c | 23 @param cipher The index of the cipher desired 27 @param num_rounds Number of rounds in the cipher desired (0 for default) 31 int cfb_start(int cipher, const unsigned char *IV, const unsigned char *key, 40 if ((err = cipher_is_valid(cipher)) != CRYPT_OK) { 46 cfb->cipher = cipher; 47 cfb->blocklen = cipher_descriptor[cipher].block_length; 51 /* init the cipher */ 52 if ((err = cipher_descriptor[cipher].setup(key, keylen, num_rounds, &cfb->key)) != CRYPT_OK) [all...] |
/libcore/luni/src/main/java/javax/crypto/ |
CipherOutputStream.java | 26 * This class wraps an output stream and a cipher so that {@code write} methods 27 * send the data through the cipher before writing them to the underlying output 30 * The cipher must be initialized for the requested operation before being used 31 * by a {@code CipherOutputStream}. For example, if a cipher initialized for 37 private final Cipher cipher; field in class:CipherOutputStream 41 * OutputStream} and a {@code Cipher}. 46 * the cipher to process the data with. 48 public CipherOutputStream(OutputStream os, Cipher c) { 50 cipher = c [all...] |
/external/dropbear/libtomcrypt/src/misc/crypt/ |
crypt_register_cipher.c | 15 Register a cipher, Tom St Denis 19 Register a cipher with the descriptor table 20 @param cipher The cipher you wish to register 23 int register_cipher(const struct ltc_cipher_descriptor *cipher) 27 LTC_ARGCHK(cipher != NULL); 32 if (cipher_descriptor[x].name != NULL && cipher_descriptor[x].ID == cipher->ID) { 41 XMEMCPY(&cipher_descriptor[x], cipher, sizeof(struct ltc_cipher_descriptor));
|
/external/bouncycastle/src/main/java/org/bouncycastle/crypto/modes/ |
SICBlockCipher.java | 10 * block cipher. This mode is also known as CTR mode. 14 private final BlockCipher cipher; field in class:SICBlockCipher 25 * @param c the block cipher to be used. 29 this.cipher = c; 30 this.blockSize = cipher.getBlockSize(); 38 * return the underlying block cipher that we are wrapping. 40 * @return the underlying block cipher that we are wrapping. 44 return cipher; 60 cipher.init(true, ivParam.getParameters()); 70 return cipher.getAlgorithmName() + "/SIC" [all...] |
/external/dropbear/libtomcrypt/src/modes/cbc/ |
cbc_start.c | 22 @param cipher The index of the cipher desired 26 @param num_rounds Number of rounds in the cipher desired (0 for default) 30 int cbc_start(int cipher, const unsigned char *IV, const unsigned char *key, 40 if ((err = cipher_is_valid(cipher)) != CRYPT_OK) { 44 /* setup cipher */ 45 if ((err = cipher_descriptor[cipher].setup(key, keylen, num_rounds, &cbc->key)) != CRYPT_OK) { 50 cbc->blocklen = cipher_descriptor[cipher].block_length; 51 cbc->cipher = cipher; [all...] |
/external/dropbear/libtomcrypt/src/modes/ofb/ |
ofb_start.c | 23 @param cipher The index of the cipher desired 27 @param num_rounds Number of rounds in the cipher desired (0 for default) 31 int ofb_start(int cipher, const unsigned char *IV, const unsigned char *key, 40 if ((err = cipher_is_valid(cipher)) != CRYPT_OK) { 45 ofb->cipher = cipher; 46 ofb->blocklen = cipher_descriptor[cipher].block_length; 51 /* init the cipher */ 53 return cipher_descriptor[cipher].setup(key, keylen, num_rounds, &ofb->key) [all...] |