/dalvik/libcore/security/src/main/java/org/bouncycastle/crypto/ |
H A D | 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 21 StreamBlockCipher( BlockCipher cipher) argument [all...] |
H A D | BufferedAsymmetricBlockCipher.java | 4 * 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 D | 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 35 BufferedBlockCipher( BlockCipher cipher) argument [all...] |
/dalvik/libcore/security/src/main/java/org/bouncycastle/crypto/macs/ |
H A D | CBCBlockCipherMac.java | 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 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 D | BlockCipherMac.java | 15 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 D | ISO9797Alg3Mac.java | 25 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 D | CFBBlockCipherMac.java | 11 * 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/crypto/modes/ |
H A D | 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 28 OFBBlockCipher( BlockCipher cipher, int blockSize) argument [all...] |
H A D | CBCBlockCipher.java | 9 * 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 D | CTSBlockCipher.java | 9 * 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 D | 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()); 66 return cipher [all...] |
H A D | PaddedBlockCipher.java | 21 * 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 D | 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 34 GOFBBlockCipher( BlockCipher cipher) argument [all...] |
H A D | 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()]; 38 this.cfbOutV = new byte[cipher 29 CFBBlockCipher( BlockCipher cipher, int bitBlockSize) argument [all...] |
/dalvik/libcore/crypto/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ |
H A D | SealedObjectTest.java | 100 * NullPointerException is thrown in the case of null cipher. 112 + "of null cipher."); 122 Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding"); 123 cipher.init(Cipher.ENCRYPT_MODE, key, ips); 125 SealedObject so = new SealedObject(secret, cipher); 127 cipher = Cipher.getInstance("DES/CBC/NoPadding"); 128 cipher.init(Cipher.ENCRYPT_MODE, key, ips); 131 new SealedObject(secret, cipher); 157 Cipher cipher = new NullCipher(); 158 SealedObject so1 = new SealedObject(secret, cipher); [all...] |
/dalvik/libcore/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ |
H A D | DigitalSignature.java | 62 private final Cipher cipher; field in class:DigitalSignature 81 cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding"); 87 cipher = null; 90 cipher = null; 111 } else if (cipher != null) { 112 cipher.init(Cipher.ENCRYPT_MODE, key); 128 } else if (cipher != null) { 129 cipher.init(Cipher.DECRYPT_MODE, cert); 179 } else if (cipher != null) { 180 cipher [all...] |
/dalvik/libcore/crypto/src/main/java/javax/crypto/ |
H A D | 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 47 * the cipher to process the data with. 51 cipher = c; 56 * OutputStream} without a cipher. 68 * Writes the single byte to this cipher output stream. 79 result = cipher [all...] |
H A D | 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 38 private final Cipher cipher; field in class:CipherInputStream 47 * InputStream} and a cipher. 52 * the cipher to process the data with. 56 this.cipher = c; 61 * InputStream} without a cipher. 73 * Reads the next byte from this cipher inpu [all...] |
H A D | EncryptedPrivateKeyInfo.java | 233 * The cipher must be initialize in either {@code Cipher.DECRYPT_MODE} or 237 * @param cipher 238 * the cipher initialized for decrypting the encrypted data. 241 * if the specified cipher is not suited to decrypt the 244 * if {@code cipher} is {@code null}. 246 public PKCS8EncodedKeySpec getKeySpec(Cipher cipher) argument 248 if (cipher == null) { 252 byte[] decryptedData = cipher.doFinal(encryptedData); 277 * if no usable cipher can be found to decrypt the encrypted 292 Cipher cipher [all...] |
/dalvik/libcore/security/src/main/java/org/bouncycastle/crypto/paddings/ |
H A D | PaddedBufferedBlockCipher.java | 23 * 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/jce/provider/ |
H A D | BrokenJCEBlockCipher.java | 61 private BufferedBlockCipher cipher; field in class:BrokenJCEBlockCipher 76 cipher = new PaddedBufferedBlockCipher(engine); 86 cipher = new PaddedBufferedBlockCipher(engine); 96 return cipher.getBlockSize(); 113 return cipher.getOutputSize(inputLen); 122 String name = cipher.getUnderlyingCipher().getAlgorithmName(); 152 cipher = new PaddedBufferedBlockCipher(cipher.getUnderlyingCipher()); 156 ivLength = cipher.getUnderlyingCipher().getBlockSize(); 157 cipher [all...] |
H A D | JCEBlockCipher.java | 72 private BufferedBlockCipher cipher; field in class:JCEBlockCipher 89 cipher = new PaddedBufferedBlockCipher(engine); 98 this.cipher = new PaddedBufferedBlockCipher(engine); 121 return cipher.getOutputSize(inputLen); 142 String name = cipher.getUnderlyingCipher().getAlgorithmName(); 173 cipher = new PaddedBufferedBlockCipher(baseEngine); 178 cipher = new PaddedBufferedBlockCipher( 188 cipher = new PaddedBufferedBlockCipher( 193 cipher = new PaddedBufferedBlockCipher( 204 cipher [all...] |
H A D | JCERSACipher.java | 38 private AsymmetricBlockCipher cipher; field in class:JCERSACipher 48 cipher = engine; 71 cipher = engine; 86 cipher = new OAEPEncoding(new RSAEngine(), digest, ((PSource.PSpecified)pSpec.getPSource()).getValue()); 94 return cipher.getInputBlockSize(); 131 return cipher.getOutputBlockSize(); 195 cipher = new RSAEngine(); 199 cipher = new PKCS1Encoding(new RSAEngine()); 203 cipher = new ISO9796d1Encoding(new RSAEngine()); 305 cipher [all...] |
H A D | JCEStreamCipher.java | 54 private StreamCipher cipher; field in class:JCEStreamCipher 65 cipher = engine; 74 cipher = new StreamBlockCipher(engine); 189 param = PBE.Util.makePBEParameters(k, params, cipher.getAlgorithmName()); 243 cipher.init(true, param); 247 cipher.init(false, param); 311 cipher.processBytes(input, inputOffset, inputLen, out, 0); 326 cipher.processBytes(input, inputOffset, inputLen, output, outputOffset); 345 cipher.reset(); 350 cipher [all...] |
/dalvik/libcore/security/src/main/java/org/bouncycastle/crypto/engines/ |
H A D | IESEngine.java | 25 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...] |