Constructor and Description |
---|
AESCrypto(java.lang.String masterPassword)
Creates the encryption and decryption objects and the key.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
decrypt(java.lang.String ciphertext)
Decrypts the cyphertext using the key.
|
java.lang.String |
encrypt(java.lang.String plaintext)
Encrypts the plaintext using the key.
|
public AESCrypto(java.lang.String masterPassword)
masterPassword
- used to derive the key. Can be null.public java.lang.String decrypt(java.lang.String ciphertext) throws CryptoException
decrypt
in interface Crypto
ciphertext
- base64 encoded encrypted dataCryptoException
- when the ciphertext cannot be decrypted with the
key or on decryption error.public java.lang.String encrypt(java.lang.String plaintext) throws CryptoException
encrypt
in interface Crypto
plaintext
- data to be encryptedCryptoException
- on encryption error
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.