Package com.kheops.util
Class RsaCipher
java.lang.Object
com.kheops.util.RsaCipher
- All Implemented Interfaces:
DecryptionCipher
,EncryptionCipher
-
Field Details
-
PRIVATE_KEY_FILENAME
- See Also:
-
PUBLIC_KEY_FILENAME
- See Also:
-
-
Constructor Details
-
RsaCipher
-
-
Method Details
-
init
Description copied from interface:EncryptionCipher
Initializes the cipher instance.- Specified by:
init
in interfaceDecryptionCipher
- Specified by:
init
in interfaceEncryptionCipher
- Throws:
Exception
-
decrypt
Description copied from interface:DecryptionCipher
Decrypts the specified data.- Specified by:
decrypt
in interfaceDecryptionCipher
- Parameters:
data
- the data to decrypt.- Returns:
- a new byte array that contains decrypted data.
- Throws:
GeneralSecurityException
-
encrypt
Description copied from interface:EncryptionCipher
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
-
encrypt
- Throws:
GeneralSecurityException
-
getPublicKey
public byte[] getPublicKey()
-