public final class FndEncryption
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static byte[] |
decrypt(byte[] cipherText)
Decrypts data previously encrypted with
encrypt(byte[] . |
static java.lang.String |
decrypt(java.lang.String cipherText)
Decrypts a string previously encrypted with
encrypt(String . |
static byte[] |
encrypt(byte[] clearText)
Encrypts data.
|
static java.lang.String |
encrypt(java.lang.String clearText)
Encrypts a
String value. |
static void |
main(java.lang.String[] args) |
public static java.lang.String decrypt(java.lang.String cipherText) throws java.io.IOException, EncryptionException
encrypt(String
.cipherText
- the encrypted text to decrypt.String
with the decrypted text. This must be
Base64 encoded data.UnsupportedEncodingException
- if the current Java platform does
not support UTF-8 character encoding.java.io.IOException
- if there is a problem with decoding the Base64
data.EncryptionException
- if there is a problem decrypting the text.
With this exception there is a parent exception available (via
getCause()
) that is the real problem that occurred.public static byte[] decrypt(byte[] cipherText) throws EncryptionException
encrypt(byte[]
.cipherText
- the encrypted data to decrypt.byte
-array with the decrypted data.EncryptionException
- if there is a problem decrypting the data.
With this exception there is a parent exception available (via
getCause()
) that is the real problem that occurred.public static java.lang.String encrypt(java.lang.String clearText) throws java.io.IOException, EncryptionException
String
value.clearText
- the string to encrypt.UnsupportedEncodingException
- if the current Java platform does
not support UTF-8 character encoding.java.io.IOException
- if there is a problem with decoding the Base64
data.EncryptionException
- if there is a problem decrypting the text.
With this exception there is a parent exception available (via
getCause()
) that is the real problem that occurred.decrypt(java.lang.String)
public static byte[] encrypt(byte[] clearText) throws EncryptionException
clearText
- the data to encrypt.EncryptionException
- if there is a problem decrypting the text.
With this exception there is a parent exception available (via
getCause()
) that is the real problem that occurred.decrypt(byte[])
public static void main(java.lang.String[] args) throws EncryptionException, java.io.IOException
EncryptionException
java.io.IOException