Class PublicPrivateEncryptionDecryptionRSA
java.lang.Object
net.finmath.decryptionoracle.decryption.PublicPrivateEncryptionDecryptionRSA
- All Implemented Interfaces:
PublicPrivateEncryptionDecryption
public class PublicPrivateEncryptionDecryptionRSA
extends Object
implements PublicPrivateEncryptionDecryption
Standard RSA encryption and decryption.
Important: This method has a limit in the plain text (~ 500 bytes).
It is suitable for encrypted-hashed-keys if this limit is respected.
For other applications use
PublicPrivateEncryptionDecryptionRSAAESHybrid.- Author:
- Christian Fries
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]decrypt(PrivateKey key, byte[] ciphertext) decrypt.byte[]encrypt.
-
Constructor Details
-
PublicPrivateEncryptionDecryptionRSA
public PublicPrivateEncryptionDecryptionRSA()
-
-
Method Details
-
encrypt
encrypt.
- Specified by:
encryptin interfacePublicPrivateEncryptionDecryption- Parameters:
key- aPublicKeyobjecttext- an array of bytes objects- Returns:
- an array of bytes objects
-
decrypt
decrypt.
- Specified by:
decryptin interfacePublicPrivateEncryptionDecryption- Parameters:
key- aPrivateKeyobjectciphertext- an array of bytes objects- Returns:
- an array of bytes objects
-