Package be.personify.util.io
Class EncryptionUtils
- java.lang.Object
-
- be.personify.util.io.EncryptionUtils
-
public class EncryptionUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description EncryptionUtils()EncryptionUtils(String value)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringdecrypt(String strToDecrypt, byte[] salt)Decrypt the thingStringencrypt(String strToEncrypt, byte[] salt)Encrypt the thingbyte[]getSalt()Get some salt
-
-
-
Constructor Detail
-
EncryptionUtils
public EncryptionUtils()
-
EncryptionUtils
public EncryptionUtils(String value)
Constructor- Parameters:
value- the value
-
-
Method Detail
-
encrypt
public String encrypt(String strToEncrypt, byte[] salt)
Encrypt the thing- Parameters:
strToEncrypt- the string to encryptsalt- the salt- Returns:
- the encrypted string
-
decrypt
public String decrypt(String strToDecrypt, byte[] salt)
Decrypt the thing- Parameters:
strToDecrypt- the string to decryptsalt- the salt- Returns:
- the decrypted string
-
getSalt
public byte[] getSalt()
Get some salt- Returns:
- the salty salt
-
-