/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/modes/ |
H A D | CCMBlockCipher.java | 16 * Implements the Counter with Cipher Block Chaining mode (CCM) detailed in 111 public void processAADByte(byte in) argument 113 associatedText.write(in); 116 public void processAADBytes(byte[] in, int inOff, int len) argument 119 associatedText.write(in, inOff, len); 122 public int processByte(byte in, byte[] out, int outOff) argument 125 data.write(in); 130 public int processBytes(byte[] in, int inOff, int inLen, byte[] out, int outOff) argument 133 data.write(in, inOff, inLen); 190 * @param in dat 197 processPacket(byte[] in, int inOff, int inLen) argument 233 processPacket(byte[] in, int inOff, int inLen, byte[] output, int outOff) argument [all...] |
H A D | CFBBlockCipher.java | 28 * @param bitBlockSize the block size in bits (note: a multiple of 8) 55 * An IV which is too short is handled in FIPS compliant fashion. 113 * and the block size in bits. 123 * @return the block size we are operating at (in bytes). 131 * Process one block of input from the array in and write it to 134 * @param in the array containing the input data. 135 * @param inOff offset into the in array the data starts at. 138 * @exception DataLengthException if there isn't enough data in in, or 139 * space in ou 143 processBlock( byte[] in, int inOff, byte[] out, int outOff) argument 165 encryptBlock( byte[] in, int inOff, byte[] out, int outOff) argument 213 decryptBlock( byte[] in, int inOff, byte[] out, int outOff) argument [all...] |
H A D | CTSBlockCipher.java | 78 * @param in the input byte. 82 * @exception DataLengthException if there isn't enough space in out. 86 byte in, 101 buf[bufOff++] = in; 109 * @param in the input byte array. 115 * @exception DataLengthException if there isn't enough space in out. 119 byte[] in, 147 System.arraycopy(in, inOff, buf, bufOff, gapLen); 159 System.arraycopy(in, inOff, buf, bufOff, blockSize); 168 System.arraycopy(in, inOf 85 processByte( byte in, byte[] out, int outOff) argument 118 processBytes( byte[] in, int inOff, int len, byte[] out, int outOff) argument [all...] |
H A D | GCMBlockCipher.java | 18 * Implements the Galois/Counter mode (GCM) detailed in 134 // Cipher always used in forward mode 211 public void processAADByte(byte in) argument 213 atBlock[atBlockPos] = in; 223 public void processAADBytes(byte[] in, int inOff, int len) argument 227 atBlock[atBlockPos] = in[inOff + i]; 259 public int processByte(byte in, byte[] out, int outOff) argument 262 bufBlock[bufOff] = in; 271 public int processBytes(byte[] in, int inOff, int len, byte[] out, int outOff) argument 278 bufBlock[bufOff] = in[inOf [all...] |
H A D | OFBBlockCipher.java | 26 * @param blockSize the block size in bits (note: a multiple of 8) 53 * An IV which is too short is handled in FIPS compliant fashion. 109 * and the block size in bits 118 * return the block size we are operating at (in bytes). 120 * @return the block size we are operating at (in bytes). 128 * Process one block of input from the array in and write it to 131 * @param in the array containing the input data. 132 * @param inOff offset into the in array the data starts at. 135 * @exception DataLengthException if there isn't enough data in in, o 140 processBlock( byte[] in, int inOff, byte[] out, int outOff) argument [all...] |
H A D | SICBlockCipher.java | 85 public int processBlock(byte[] in, int inOff, byte[] out, int outOff) argument 95 out[outOff + i] = (byte)(counterOut[i] ^ in[inOff + i]); 101 ; // do nothing - pre-increment and test for 0 in counter does the job.
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/paddings/ |
H A D | BlockCipherPadding.java | 28 * add the pad bytes to the passed in block, returning the 32 * passed to it inside in. i.e. if inOff is zero, indicating the 33 * entire block is to be overwritten with padding the value of in 39 public int addPadding(byte[] in, int inOff); argument 42 * return the number of pad bytes present in the block. 46 public int padCount(byte[] in) argument
|
H A D | ISO10126d2Padding.java | 44 * add the pad bytes to the passed in block, returning the 48 byte[] in, 51 byte code = (byte)(in.length - inOff); 53 while (inOff < (in.length - 1)) 55 in[inOff] = (byte)random.nextInt(); 59 in[inOff] = code; 65 * return the number of pad bytes present in the block. 67 public int padCount(byte[] in) argument 70 int count = in[in 47 addPadding( byte[] in, int inOff) argument [all...] |
H A D | ISO7816d4Padding.java | 8 * A padder that adds the padding according to the scheme referenced in 36 * add the pad bytes to the passed in block, returning the 40 byte[] in, 43 int added = (in.length - inOff); 45 in [inOff]= (byte) 0x80; 48 while (inOff < in.length) 50 in[inOff] = (byte) 0; 58 * return the number of pad bytes present in the block. 60 public int padCount(byte[] in) argument 63 int count = in 39 addPadding( byte[] in, int inOff) argument [all...] |
H A D | PKCS7Padding.java | 35 * add the pad bytes to the passed in block, returning the 39 byte[] in, 42 byte code = (byte)(in.length - inOff); 44 while (inOff < in.length) 46 in[inOff] = code; 54 * return the number of pad bytes present in the block. 56 public int padCount(byte[] in) argument 59 int count = in[in.length - 1] & 0xff; 61 if (count > in 38 addPadding( byte[] in, int inOff) argument [all...] |
H A D | PaddedBufferedBlockCipher.java | 12 * A wrapper class that allows block ciphers to be used to process data in 15 * or on a doFinal (unless the current block in the buffer is a pad block). 16 * The default padding mechanism used is the one outlined in PKCS5/PKCS7. 137 * @param in the input byte. 141 * @exception DataLengthException if there isn't enough space in out. 145 byte in, 158 buf[bufOff++] = in; 166 * @param in the input byte array. 172 * @exception DataLengthException if there isn't enough space in out. 176 byte[] in, 144 processByte( byte in, byte[] out, int outOff) argument 175 processBytes( byte[] in, int inOff, int len, byte[] out, int outOff) argument [all...] |
H A D | TBCPadding.java | 39 * add the pad bytes to the passed in block, returning the 43 * passed to it inside in. i.e. if inOff is zero, indicating the 44 * entire block is to be overwritten with padding the value of in 49 byte[] in, 52 int count = in.length - inOff; 57 code = (byte)((in[inOff - 1] & 0x01) == 0 ? 0xff : 0x00); 61 code = (byte)((in[in.length - 1] & 0x01) == 0 ? 0xff : 0x00); 64 while (inOff < in.length) 66 in[inOf 48 addPadding( byte[] in, int inOff) argument 76 padCount(byte[] in) argument [all...] |
H A D | X923Padding.java | 9 * passed in random padding is assumed, otherwise padding with zeros is used. 38 * add the pad bytes to the passed in block, returning the 42 byte[] in, 45 byte code = (byte)(in.length - inOff); 47 while (inOff < in.length - 1) 51 in[inOff] = 0; 55 in[inOff] = (byte)random.nextInt(); 60 in[inOff] = code; 66 * return the number of pad bytes present in the block. 68 public int padCount(byte[] in) argument 41 addPadding( byte[] in, int inOff) argument [all...] |
H A D | ZeroBytePadding.java | 35 * add the pad bytes to the passed in block, returning the 39 byte[] in, 42 int added = (in.length - inOff); 44 while (inOff < in.length) 46 in[inOff] = (byte) 0; 54 * return the number of pad bytes present in the block. 56 public int padCount(byte[] in) argument 59 int count = in.length; 63 if (in[count - 1] != 0) 71 return in 38 addPadding( byte[] in, int inOff) argument [all...] |
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/ |
H A D | BCDHPrivateKey.java | 108 * return the encoding format we produce in getEncoded(). 193 ObjectInputStream in) 196 in.defaultReadObject(); 198 this.dhSpec = new DHParameterSpec((BigInteger)in.readObject(), (BigInteger)in.readObject(), in.readInt()); 192 readObject( ObjectInputStream in) argument
|
H A D | BCDHPublicKey.java | 75 throw new IllegalArgumentException("invalid info structure in DH public key"); 185 ObjectInputStream in) 188 in.defaultReadObject(); 190 this.dhSpec = new DHParameterSpec((BigInteger)in.readObject(), (BigInteger)in.readObject(), in.readInt()); 184 readObject( ObjectInputStream in) argument
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dsa/ |
H A D | BCDSAPrivateKey.java | 77 * return the encoding format we produce in getEncoded(). 148 ObjectInputStream in) 151 in.defaultReadObject(); 153 this.dsaSpec = new DSAParameterSpec((BigInteger)in.readObject(), (BigInteger)in.readObject(), (BigInteger)in.readObject()); 147 readObject( ObjectInputStream in) argument
|
H A D | BCDSAPublicKey.java | 71 throw new IllegalArgumentException("invalid info structure in DSA public key"); 153 ObjectInputStream in) 156 in.defaultReadObject(); 158 this.dsaSpec = new DSAParameterSpec((BigInteger)in.readObject(), (BigInteger)in.readObject(), (BigInteger)in.readObject()); 152 readObject( ObjectInputStream in) argument
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/ |
H A D | BCECPrivateKey.java | 268 * return the encoding format we produce in getEncoded(). 441 ObjectInputStream in) 444 in.defaultReadObject(); 446 byte[] enc = (byte[])in.readObject(); 440 readObject( ObjectInputStream in) argument
|
H A D | BCECPublicKey.java | 436 ObjectInputStream in) 439 in.defaultReadObject(); 441 byte[] enc = (byte[])in.readObject(); 435 readObject( ObjectInputStream in) argument
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/rsa/ |
H A D | BCRSAPrivateKey.java | 125 ObjectInputStream in) 128 in.defaultReadObject(); 124 readObject( ObjectInputStream in) argument
|
H A D | BCRSAPublicKey.java | 71 throw new IllegalArgumentException("invalid info structure in RSA public key"); 146 ObjectInputStream in) 149 in.defaultReadObject(); 153 algorithmIdentifier = AlgorithmIdentifier.getInstance(in.readObject()); 145 readObject( ObjectInputStream in) argument
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/util/ |
H A D | PKCS12BagAttributeCarrierImpl.java | 103 public void readObject(ObjectInputStream in) argument 106 Object obj = in.readObject(); 111 this.pkcs12Ordering = (Vector)in.readObject();
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/x509/ |
H A D | CertificateFactory.java | 92 InputStream in) 95 ASN1Sequence seq = PEM_CERT_PARSER.readPEMObject(in); 113 InputStream in) 116 ASN1Sequence seq = PEM_CRL_PARSER.readPEMObject(in); 167 InputStream in) 172 currentStream = in; 176 else if (currentStream != in) // reset if input stream has changed 178 currentStream = in; 199 PushbackInputStream pis = new PushbackInputStream(in); 91 readPEMCertificate( InputStream in) argument 112 readPEMCRL( InputStream in) argument 166 engineGenerateCertificate( InputStream in) argument
|
H A D | PEMUtil.java | 26 InputStream in) 34 while (((c = in.read()) != '\r') && c != '\n' && (c >= 0)) 55 InputStream in) 61 while ((line = readLine(in)) != null) 69 while ((line = readLine(in)) != null) 25 readLine( InputStream in) argument 54 readPEMObject( InputStream in) argument
|