org.bouncycastle.crypto.engines
Class RSACoreEngine
java.lang.Object
org.bouncycastle.crypto.engines.RSACoreEngine
class RSACoreEngine
- extends java.lang.Object
this does your basic RSA algorithm.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
key
private RSAKeyParameters key
forEncryption
private boolean forEncryption
RSACoreEngine
RSACoreEngine()
init
public void init(boolean forEncryption,
CipherParameters param)
- initialise the RSA engine.
- Parameters:
forEncryption
- true if we are encrypting, false otherwise.param
- the necessary RSA key parameters.
getInputBlockSize
public int getInputBlockSize()
- Return the maximum size for an input block to this engine. For RSA this
is always one byte less than the key size on encryption, and the same
length as the key size on decryption.
- Returns:
- maximum size for an input block.
getOutputBlockSize
public int getOutputBlockSize()
- Return the maximum size for an output block to this engine. For RSA this
is always one byte less than the key size on decryption, and the same
length as the key size on encryption.
- Returns:
- maximum size for an output block.
convertInput
public java.math.BigInteger convertInput(byte[] in,
int inOff,
int inLen)
convertOutput
public byte[] convertOutput(java.math.BigInteger result)
processBlock
public java.math.BigInteger processBlock(java.math.BigInteger input)
JavaDoc