Package org.jolokia.server.core.util
Class JolokiaCipher
java.lang.Object
org.jolokia.server.core.util.JolokiaCipher
Simple symmetric, salted encryption.
Most of the code has been borrowed from
Plexus code
- Since:
- 12/09/2015
- Author:
- nevenr
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
JolokiaCipher
- Throws:
GeneralSecurityException
-
JolokiaCipher
- Throws:
NoSuchAlgorithmException
-
-
Method Details
-
encrypt
Encrypt a string with a password.- Parameters:
pText- text to encode- Returns:
- the encoded password
- Throws:
GeneralSecurityException
-
decrypt
Decrypt a password encrypted withencrypt(String)- Parameters:
pEncryptedText- encrypted text- Returns:
- the decrypted text
- Throws:
GeneralSecurityException- when decryption fails
-