org.bouncycastle.crypto.AsymmetricBlockCipherpublic final class NativeRSAEngine
extends org.bouncycastle.crypto.engines.RSAEngine
implements org.bouncycastle.crypto.AsymmetricBlockCipher
SQUARE: replacement for RSAEngine; this is much faster using jna-gmp.
| Constructor | Description |
|---|---|
NativeRSAEngine() |
| Modifier and Type | Method | 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,
org.bouncycastle.crypto.CipherParameters param) |
initialise the RSA engine.
|
byte[] |
processBlock(byte[] in,
int inOff,
int inLen) |
Process a single block using the basic RSA algorithm.
|
public void init(boolean forEncryption,
org.bouncycastle.crypto.CipherParameters param)
init in interface org.bouncycastle.crypto.AsymmetricBlockCipherinit in class org.bouncycastle.crypto.engines.RSAEngineforEncryption - true if we are encrypting, false otherwise.param - the necessary RSA key parameters.public int getInputBlockSize()
getInputBlockSize in interface org.bouncycastle.crypto.AsymmetricBlockCiphergetInputBlockSize in class org.bouncycastle.crypto.engines.RSAEnginepublic int getOutputBlockSize()
getOutputBlockSize in interface org.bouncycastle.crypto.AsymmetricBlockCiphergetOutputBlockSize in class org.bouncycastle.crypto.engines.RSAEnginepublic byte[] processBlock(byte[] in,
int inOff,
int inLen)
processBlock in interface org.bouncycastle.crypto.AsymmetricBlockCipherprocessBlock in class org.bouncycastle.crypto.engines.RSAEnginein - the input array.inOff - the offset into the input buffer where the data starts.inLen - the length of the data to be processed.org.bouncycastle.crypto.DataLengthException - the input block is too large.