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:EncryptionCipherInitializes the cipher instance.- Specified by:
initin interfaceDecryptionCipher- Specified by:
initin interfaceEncryptionCipher- Throws:
Exception
-
decrypt
Description copied from interface:DecryptionCipherDecrypts the specified data.- Specified by:
decryptin interfaceDecryptionCipher- Parameters:
data- the data to decrypt.- Returns:
- a new byte array that contains decrypted data.
- Throws:
GeneralSecurityException
-
encrypt
Description copied from interface:EncryptionCipherEncrypts the specified data.- Specified by:
encryptin 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()
-