public class ASymMixCipherPlainRSA extends java.lang.Object implements IASymMixCipher
Constructor and Description |
---|
ASymMixCipherPlainRSA() |
Modifier and Type | Method and Description |
---|---|
int |
encrypt(byte[] from,
int ifrom,
byte[] to,
int ito)
Encrypts one block of data using an asymmetric encryption algorithm.
|
int |
getInputBlockSize()
Returns the necessary input block size of the asymmetric mix cipher.
|
int |
getOutputBlockSize()
Returns the output block size of the asymmetric mix cipher.
|
int |
getPaddingSize()
Returns the padding size used by the asymmetric mix cipher in bytes.
|
MyRSAPublicKey |
getPublicKey() |
int |
setPrivateKey(java.math.BigInteger modulus,
java.math.BigInteger exponent,
java.math.BigInteger privateExponent,
java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger dP,
java.math.BigInteger dQ,
java.math.BigInteger qInv) |
int |
setPrivateKey(org.w3c.dom.Element xmlKey) |
int |
setPublicKey(java.math.BigInteger modulus,
java.math.BigInteger exponent) |
int |
setPublicKey(org.w3c.dom.Element xmlKey) |
public int encrypt(byte[] from, int ifrom, byte[] to, int ito)
IASymMixCipher
encrypt
in interface IASymMixCipher
from
- Byte buffer to take the plain text from.ifrom
- Offset in the plain text.to
- Byte buffer to write the cipher text to.ito
- Offset in the target buffer.public int getOutputBlockSize()
IASymMixCipher
getOutputBlockSize
in interface IASymMixCipher
public int getInputBlockSize()
IASymMixCipher
getInputBlockSize
in interface IASymMixCipher
public int getPaddingSize()
IASymMixCipher
getPaddingSize
in interface IASymMixCipher
public int setPublicKey(java.math.BigInteger modulus, java.math.BigInteger exponent)
setPublicKey
in interface IASymMixCipher
public int setPrivateKey(java.math.BigInteger modulus, java.math.BigInteger exponent, java.math.BigInteger privateExponent, java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger dP, java.math.BigInteger dQ, java.math.BigInteger qInv)
public int setPublicKey(org.w3c.dom.Element xmlKey)
setPublicKey
in interface IASymMixCipher
public int setPrivateKey(org.w3c.dom.Element xmlKey)
public MyRSAPublicKey getPublicKey()
getPublicKey
in interface IASymMixCipher
Copyright © 2023. All rights reserved.