public class BlockCipherAdapter
extends java.lang.Object
implements org.bouncycastle.crypto.BlockCipher
Constructor and Description |
---|
BlockCipherAdapter(javax.crypto.Cipher cipher)
Initializes a new BlockCipherAdapter instance which is to adapt
a specific javax.crypto.Cipher instance to the
org.bouncycastle.crypto.BlockCipher interface.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAlgorithmName() |
int |
getBlockSize() |
javax.crypto.Cipher |
getCipher()
Gets the javax.crypto.Cipher instance which is adapted to the
org.bouncycastle.crypto.BlockCipher interface by this instance.
|
void |
init(boolean forEncryption,
org.bouncycastle.crypto.CipherParameters params) |
int |
processBlock(byte[] in,
int inOff,
byte[] out,
int outOff) |
void |
reset() |
public BlockCipherAdapter(javax.crypto.Cipher cipher)
cipher
- the javax.crypto.Cipher instance to be adapted to
the org.bouncycastle.crypto.BlockCipher interface by the new
instancepublic java.lang.String getAlgorithmName()
getAlgorithmName
in interface org.bouncycastle.crypto.BlockCipher
public int getBlockSize()
getBlockSize
in interface org.bouncycastle.crypto.BlockCipher
public javax.crypto.Cipher getCipher()
public void init(boolean forEncryption, org.bouncycastle.crypto.CipherParameters params) throws java.lang.IllegalArgumentException
init
in interface org.bouncycastle.crypto.BlockCipher
java.lang.IllegalArgumentException
public int processBlock(byte[] in, int inOff, byte[] out, int outOff) throws org.bouncycastle.crypto.DataLengthException, java.lang.IllegalStateException
processBlock
in interface org.bouncycastle.crypto.BlockCipher
org.bouncycastle.crypto.DataLengthException
java.lang.IllegalStateException
public void reset()
reset
in interface org.bouncycastle.crypto.BlockCipher
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.