Package org.wildfly.security.encryption
Class CipherUtil
- java.lang.Object
-
- org.wildfly.security.encryption.CipherUtil
-
public class CipherUtil extends Object
A utility for usingCipherinstances to encrypt and encode as well as decode and decrypt clear text Strings.- Author:
- Darran Lofthouse
-
-
Constructor Summary
Constructors Constructor Description CipherUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringdecrypt(String token, SecretKey secretKey)static Stringencrypt(String clearText, SecretKey secretKey)
-
-
-
Method Detail
-
encrypt
public static String encrypt(String clearText, SecretKey secretKey) throws GeneralSecurityException
- Throws:
GeneralSecurityException
-
decrypt
public static String decrypt(String token, SecretKey secretKey) throws GeneralSecurityException
- Throws:
GeneralSecurityException
-
-