Package com.kheops.util
Class RsaClientCipher
java.lang.Object
com.kheops.util.RsaClientCipher
- All Implemented Interfaces:
EncryptionCipher
-
Constructor Summary
ConstructorDescriptionRsaClientCipher
(byte[] encodedPublicKey) Creates a new cipher client using the specified RSA public key. -
Method Summary
-
Constructor Details
-
RsaClientCipher
public RsaClientCipher(byte[] encodedPublicKey) Creates a new cipher client using the specified RSA public key.- Parameters:
encodedPublicKey
- a RSA public key.
-
-
Method Details
-
init
Initializes the cipher instance.- Specified by:
init
in interfaceEncryptionCipher
- Throws:
Exception
-
encrypt
Encrypts the specified data.- Specified by:
encrypt
in interfaceEncryptionCipher
- Parameters:
data
- the data to encrypt.- Returns:
- a new byte array that contains encrypted data.
- Throws:
GeneralSecurityException
-