public class RSABlindedEngine extends java.lang.Object implements AsymmetricBlockCipher
Constructor and Description |
---|
RSABlindedEngine() |
Modifier and Type | Method and Description |
---|---|
int |
getInputBlockSize()
Return the maximum size for an input block to this engine.
|
int |
getOutputBlockSize()
Return the maximum size for an output block to this engine.
|
void |
init(boolean forEncryption,
CipherParameters parameters)
initialise the RSA engine.
|
protected java.security.SecureRandom |
initSecureRandom(boolean needed,
java.security.SecureRandom provided) |
byte[] |
processBlock(byte[] in,
int inOff,
int inLen)
Process a single block using the basic RSA algorithm.
|
public void init(boolean forEncryption, CipherParameters parameters)
init
in interface AsymmetricBlockCipher
forEncryption
- true if we are encrypting, false otherwise.param
- the necessary RSA key parameters.public int getInputBlockSize()
getInputBlockSize
in interface AsymmetricBlockCipher
public int getOutputBlockSize()
getOutputBlockSize
in interface AsymmetricBlockCipher
public byte[] processBlock(byte[] in, int inOff, int inLen)
processBlock
in interface AsymmetricBlockCipher
in
- the input array.inOff
- the offset into the input buffer where the data starts.inLen
- the length of the data to be processed.DataLengthException
- the input block is too large.protected java.security.SecureRandom initSecureRandom(boolean needed, java.security.SecureRandom provided)