Searched defs:cipher (Results 1 - 25 of 37) sorted by relevance

12

/dalvik/libcore/crypto/src/main/java/javax/crypto/
H A DCipherOutputStream.java26 * 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
40 private final Cipher cipher; field in class:CipherOutputStream
50 * the cipher to process the data with.
55 cipher = c;
60 * OutputStream} without a cipher.
74 * Writes the single byte to this cipher output stream.
86 result = cipher
[all...]
H A DCipherInputStream.java27 * 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
41 private final Cipher cipher; field in class:CipherInputStream
50 * InputStream} and a cipher.
55 * the cipher to process the data with.
60 this.cipher = c;
65 * InputStream} without a cipher.
79 * Reads the next byte from this cipher inpu
[all...]
H A DEncryptedPrivateKeyInfo.java242 * The cipher must be initialize in either {@code Cipher.DECRYPT_MODE} or
247 * @param cipher
248 * the cipher initialized for decrypting the encrypted data.
251 * if the specified cipher is not suited to decrypt the
254 * if {@code cipher} is {@code null}.
257 public PKCS8EncodedKeySpec getKeySpec(Cipher cipher) argument
259 if (cipher == null) {
263 byte[] decryptedData = cipher.doFinal(encryptedData);
288 * if no usable cipher can be found to decrypt the encrypted
304 Cipher cipher
[all...]
/dalvik/libcore/security/src/main/java/org/bouncycastle/crypto/modes/
H A DPaddedBlockCipher.java21 * Create a buffered block cipher with, or without, padding.
23 * @param cipher the underlying block cipher this buffering object wraps.
26 BlockCipher cipher)
28 this.cipher = cipher;
30 buf = new byte[cipher.getBlockSize()];
90 * @exception IllegalStateException if the cipher isn't initialised.
102 resultLen = cipher.processBlock(buf, 0, out, outOff);
120 * @exception IllegalStateException if the cipher is
25 PaddedBlockCipher( BlockCipher cipher) argument
[all...]
H A DCTSBlockCipher.java9 * A Cipher Text Stealing (CTS) mode cipher. CTS allows block ciphers to
10 * be used to produce cipher text which is the same length as the plain text.
18 * Create a buffered block cipher that uses Cipher Text Stealing
20 * @param cipher the underlying block cipher this buffering object wraps.
23 BlockCipher cipher)
25 if ((cipher instanceof OFBBlockCipher) || (cipher instanceof CFBBlockCipher))
30 this.cipher = cipher;
22 CTSBlockCipher( BlockCipher cipher) argument
[all...]
H A DCBCBlockCipher.java9 * implements Cipher-Block-Chaining (CBC) mode on top of a simple cipher.
19 private BlockCipher cipher = null; field in class:CBCBlockCipher
25 * @param cipher the block cipher to be used as the basis of chaining.
28 BlockCipher cipher)
30 this.cipher = cipher;
31 this.blockSize = cipher.getBlockSize();
39 * return the underlying block cipher that we are wrapping.
41 * @return the underlying block cipher tha
27 CBCBlockCipher( BlockCipher cipher) argument
[all...]
H A DCCMBlockCipher.java19 private BlockCipher cipher = null; field in class:CCMBlockCipher
29 * @param c the block cipher to be used.
33 this.cipher = c;
39 throw new IllegalArgumentException("cipher required with a block size of 16.");
44 * return the underlying block cipher that we are wrapping.
46 * @return the underlying block cipher that we are wrapping.
50 return cipher;
68 return cipher.getAlgorithmName() + "/CCM";
91 throw new IllegalStateException("CCM cipher unitialized.");
94 BlockCipher ctrCipher = new SICBlockCipher(cipher);
[all...]
H A DCFBBlockCipher.java9 * 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()];
38 this.cfbOutV = new byte[cipher
29 CFBBlockCipher( BlockCipher cipher, int bitBlockSize) argument
[all...]
H A DOFBBlockCipher.java9 * 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
28 OFBBlockCipher( BlockCipher cipher, int blockSize) argument
[all...]
H A DSICBlockCipher.java10 * 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());
66 return cipher
[all...]
H A DGOFBBlockCipher.java19 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
34 GOFBBlockCipher( BlockCipher cipher) argument
[all...]
/dalvik/libcore/security/src/main/java/org/bouncycastle/crypto/
H A DStreamBlockCipher.java10 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
21 StreamBlockCipher( BlockCipher cipher) argument
[all...]
H A DBufferedAsymmetricBlockCipher.java4 * a buffer wrapper for an asymmetric block cipher, allowing input
12 private final AsymmetricBlockCipher cipher; field in class:BufferedAsymmetricBlockCipher
17 * @param cipher the cipher this buffering object wraps.
20 AsymmetricBlockCipher cipher)
22 this.cipher = cipher;
26 * return the underlying cipher for the buffer.
28 * @return the underlying cipher for the buffer.
32 return cipher;
19 BufferedAsymmetricBlockCipher( AsymmetricBlockCipher cipher) argument
[all...]
H A DBufferedBlockCipher.java9 * 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
35 BufferedBlockCipher( BlockCipher cipher) argument
[all...]
/dalvik/libcore/security/src/main/java/org/bouncycastle/crypto/paddings/
H A DPaddedBufferedBlockCipher.java23 * Create a buffered block cipher with the desired padding.
25 * @param cipher the underlying block cipher this buffering object wraps.
29 BlockCipher cipher,
32 this.cipher = cipher;
35 buf = new byte[cipher.getBlockSize()];
40 * Create a buffered block cipher PKCS7 padding
42 * @param cipher the underlying block cipher thi
28 PaddedBufferedBlockCipher( BlockCipher cipher, BlockCipherPadding padding) argument
44 PaddedBufferedBlockCipher( BlockCipher cipher) argument
[all...]
/dalvik/libcore/security/src/main/java/org/bouncycastle/crypto/encodings/
H A DISO9796d1Encoding.java30 AsymmetricBlockCipher cipher)
32 this.engine = cipher;
29 ISO9796d1Encoding( AsymmetricBlockCipher cipher) argument
H A DPKCS1Encoding.java38 * @param cipher
41 AsymmetricBlockCipher cipher)
43 this.engine = cipher;
40 PKCS1Encoding( AsymmetricBlockCipher cipher) argument
H A DOAEPEncoding.java27 AsymmetricBlockCipher cipher)
29 this(cipher, new SHA1Digest(), null);
33 AsymmetricBlockCipher cipher,
36 this(cipher, hash, null);
40 AsymmetricBlockCipher cipher,
44 this.engine = cipher;
26 OAEPEncoding( AsymmetricBlockCipher cipher) argument
32 OAEPEncoding( AsymmetricBlockCipher cipher, Digest hash) argument
39 OAEPEncoding( AsymmetricBlockCipher cipher, Digest hash, byte[] encodingParams) argument
/dalvik/libcore/security/src/main/java/org/bouncycastle/crypto/engines/
H A DIESEngine.java25 BufferedBlockCipher cipher; field in class:IESEngine
49 this.cipher = null;
53 * set up for use in conjunction with a block cipher to handle the
59 * @param cipher the cipher to used for encrypting the message
65 BufferedBlockCipher cipher)
71 this.cipher = cipher;
110 if (cipher == null) // stream mode
130 cipher
61 IESEngine( BasicAgreement agree, DerivationFunction kdf, Mac mac, BufferedBlockCipher cipher) argument
[all...]
/dalvik/libcore/security/src/main/java/org/bouncycastle/crypto/macs/
H A DBlockCipherMac.java15 private BlockCipher cipher; field in class:BlockCipherMac
20 * create a standard MAC based on a block cipher. This will produce an
21 * authentication code half the length of the block size of the cipher.
23 * @param cipher the cipher to be used as the basis of the MAC generation.
27 BlockCipher cipher)
29 this(cipher, (cipher.getBlockSize() * 8) / 2);
33 * create a standard MAC based on a block cipher with the size of the
37 * and in general should be less than the size of the block cipher a
26 BlockCipherMac( BlockCipher cipher) argument
44 BlockCipherMac( BlockCipher cipher, int macSizeInBits) argument
[all...]
H A DCBCBlockCipherMac.java20 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 an
39 * authentication code half the length of the block size of the cipher
31 CBCBlockCipherMac( BlockCipher cipher) argument
44 CBCBlockCipherMac( BlockCipher cipher, BlockCipherPadding padding) argument
64 CBCBlockCipherMac( BlockCipher cipher, int macSizeInBits) argument
85 CBCBlockCipherMac( BlockCipher cipher, int macSizeInBits, BlockCipherPadding padding) argument
[all...]
H A DISO9797Alg3Mac.java25 private BlockCipher cipher; field in class:ISO9797Alg3Mac
33 * create a Retail-MAC based on a CBC block cipher. This will produce an
34 * authentication code of the length of the block size of the cipher.
36 * @param cipher the cipher to be used as the basis of the MAC generation. This must
40 BlockCipher cipher)
42 this(cipher, cipher.getBlockSize() * 8, null);
46 * create a Retail-MAC based on a CBC block cipher. This will produce an
47 * authentication code of the length of the block size of the cipher
39 ISO9797Alg3Mac( BlockCipher cipher) argument
52 ISO9797Alg3Mac( BlockCipher cipher, BlockCipherPadding padding) argument
72 ISO9797Alg3Mac( BlockCipher cipher, int macSizeInBits) argument
94 ISO9797Alg3Mac( BlockCipher cipher, int macSizeInBits, BlockCipherPadding padding) argument
[all...]
H A DCFBBlockCipherMac.java11 * implements a Cipher-FeedBack (CFB) mode on top of a simple cipher.
20 private BlockCipher cipher = null; field in class:MacCFBBlockCipher
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()];
38 this.cfbOutV = new byte[cipher
29 MacCFBBlockCipher( BlockCipher cipher, int bitBlockSize) argument
175 private MacCFBBlockCipher cipher; field in class:CFBBlockCipherMac
188 CFBBlockCipherMac( BlockCipher cipher) argument
202 CFBBlockCipherMac( BlockCipher cipher, BlockCipherPadding padding) argument
223 CFBBlockCipherMac( BlockCipher cipher, int cfbBitSize, int macSizeInBits) argument
246 CFBBlockCipherMac( BlockCipher cipher, int cfbBitSize, int macSizeInBits, BlockCipherPadding padding) argument
[all...]
/dalvik/libcore/security/src/main/java/org/bouncycastle/jce/provider/
H A DJDKISOSignature.java31 AsymmetricBlockCipher cipher)
35 signer = new ISO9796d2Signer(cipher, digest, true);
28 JDKISOSignature( String name, Digest digest, AsymmetricBlockCipher cipher) argument
/dalvik/libcore/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/
H A DDigitalSignature.java62 private Cipher cipher = null; field in class:DigitalSignature
80 cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
109 } else if (cipher != null) {
110 cipher.init(Cipher.ENCRYPT_MODE, key);
125 } else if (cipher != null) {
126 cipher.init(Cipher.DECRYPT_MODE, cert);
179 } else if (cipher != null) {
180 cipher.update(md5_hash);
190 } else if (cipher != null) {
191 cipher
[all...]

Completed in 193 milliseconds

12