HomeSort by relevance Sort by last modified time
    Searched defs:cipher (Results 1 - 25 of 129) sorted by null

1 2 3 4 5 6

  /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...]
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/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.
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...]
GOFBBlockCipher.java 19 private final BlockCipher cipher; field in class:GOFBBlockCipher
31 * @param cipher the block cipher to be used as the basis of the
35 BlockCipher cipher)
37 this.cipher = cipher;
38 this.blockSize = cipher.getBlockSize();
45 this.IV = new byte[cipher.getBlockSize()];
46 this.ofbV = new byte[cipher.getBlockSize()];
47 this.ofbOutV = new byte[cipher.getBlockSize()]
    [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...]
GCMBlockCipher.java 26 private BlockCipher cipher; field in class:GCMBlockCipher
57 "cipher required with a block size of " + BLOCK_SIZE + ".");
66 this.cipher = c;
72 return cipher;
77 return cipher.getAlgorithmName() + "/GCM";
130 // Cipher always used in forward mode
131 cipher.init(true, keyParam);
138 cipher.processBlock(ZEROES, 0, H, 0);
269 cipher.processBlock(J0, 0, tag, 0);
323 cipher.reset()
    [all...]
  /libcore/luni/src/test/java/libcore/javax/crypto/
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") local
    [all...]
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...]
  /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/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/src/main/java/org/bouncycastle/jce/provider/
JCEStreamCipher.java 10 import javax.crypto.Cipher;
57 private StreamCipher cipher; field in class:JCEStreamCipher
69 cipher = engine;
79 cipher = new StreamBlockCipher(engine);
194 param = PBE.Util.makePBEParameters(k, params, cipher.getAlgorithmName());
230 if ((opmode == Cipher.ENCRYPT_MODE) || (opmode == Cipher.WRAP_MODE))
246 case Cipher.ENCRYPT_MODE:
247 case Cipher.WRAP_MODE:
248 cipher.init(true, param)
    [all...]
JDKDigestSignature.java 51 private AsymmetricBlockCipher cipher; field in class:JDKDigestSignature
57 AsymmetricBlockCipher cipher)
60 this.cipher = cipher;
68 AsymmetricBlockCipher cipher)
71 this.cipher = cipher;
87 cipher.init(false, param);
103 cipher.init(true, param);
144 return cipher.processBlock(bytes, 0, bytes.length)
    [all...]
  /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/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
48 * InputStream} and a cipher.
57 * the cipher to process the data with.
59 public CipherInputStream(InputStream is, Cipher c) {
61 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.
66 * and sealing it using the specified cipher.
68 * The cipher must be fully initialized.
73 * the cipher to encrypt the object.
77 * if the specified cipher is a block cipher and the length of
81 * if the cipher is {@code null}.
83 public SealedObject(Serializable object, Cipher c)
99 // should be never thrown because the cipher
153 Cipher cipher = Cipher.getInstance(sealAlg); local
248 Cipher cipher = Cipher.getInstance(sealAlg, provider); local
    [all...]
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...]
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
231 * @param cipher
232 * the cipher initialized for decrypting the encrypted data.
235 * if the specified cipher is not suited to decrypt the
238 * if {@code cipher} is {@code null}.
240 public PKCS8EncodedKeySpec getKeySpec(Cipher cipher)
242 if (cipher == null)
284 Cipher cipher = Cipher.getInstance(algName); local
343 Cipher cipher = Cipher.getInstance(algName, providerName); local
397 Cipher cipher = Cipher.getInstance(algName, provider); local
    [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/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/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...]

Completed in 364 milliseconds

1 2 3 4 5 6