|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BlockCipher
An interface, which encapsulates symmetric ciphers like 3-DES or AES.
Method Summary | |
---|---|
java.lang.String |
getAlgorithmName()
Return the name of the algorithm the cipher implements. |
int |
getBlockSize()
|
BlockCipher |
getUnderlyingCipher()
return the underlying block cipher that we are wrapping or null , if we do wrap another cipher. |
void |
init(byte[] key,
boolean forEncryption)
Initialize the block cipher. |
int |
processBlock(byte[] in,
int in_off,
byte[] out,
int out_off)
Proceed the next block of getBlockSize() bytes from the input. |
void |
reset()
Reset this cipher to state of the last call to #init(byte[], byte[], boolean) . |
Method Detail |
---|
java.lang.String getAlgorithmName()
int getBlockSize()
processBlock(byte[], int, byte[], int)
operation.void init(byte[] key, boolean forEncryption)
key
- The key for basic ciphers or initialization vector for cipher modes
or null
, if no key or initialization vector is needed.forEncryption
- Whether we want to encrypt. false
means to set up this cipher for decryption.int processBlock(byte[] in, int in_off, byte[] out, int out_off)
getBlockSize()
bytes from the input.
in
- The buffer where the input is stored.
getBlockSize()
bytes starting with in_off
will be consumed.in_off
- The offset at which the input data starts.out
- The buffer where the output is stored.
getBlockSize()
bytes starting with out_off
will be written.out_off
- The offset at which the output will be stored.
void reset()
#init(byte[], byte[], boolean)
.
BlockCipher getUnderlyingCipher()
null
, if we do wrap another cipher.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |