|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.security.util.EncryptionUtils
@Deprecated public final class EncryptionUtils
A static utility class that can encrypt and decrypt text.
This class is useful if you have simple needs and wish to use the DESede encryption cipher. More sophisticated requirements will need to use the Java crypto libraries directly.
Nested Class Summary | |
---|---|
static class |
EncryptionUtils.EncryptionException
Deprecated. |
Method Summary | |
---|---|
static java.lang.String |
byteArrayToString(byte[] byteArray)
Deprecated. Converts a byte array into a String using UTF-8, falling back to the platform's default character set if UTF-8 fails. |
static byte[] |
decrypt(java.lang.String key,
byte[] inputBytes)
Deprecated. Decrypts the inputBytes using the key. |
static java.lang.String |
decrypt(java.lang.String key,
java.lang.String inputString)
Deprecated. Decrypts the inputString using the key. |
static byte[] |
encrypt(java.lang.String key,
byte[] inputBytes)
Deprecated. Encrypts the inputBytes using the key. |
static java.lang.String |
encrypt(java.lang.String key,
java.lang.String inputString)
Deprecated. Encrypts the inputString using the key. |
static byte[] |
stringToByteArray(java.lang.String input)
Deprecated. Converts a String into a byte array using UTF-8, falling back to the platform's default character set if UTF-8 fails. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static byte[] stringToByteArray(java.lang.String input)
input
- the input (required)
public static java.lang.String byteArrayToString(byte[] byteArray)
byteArray
- the byte array to convert (required)
public static java.lang.String encrypt(java.lang.String key, java.lang.String inputString) throws EncryptionUtils.EncryptionException
key
- at least 24 character long key (required)inputString
- the string to encrypt (required)
EncryptionUtils.EncryptionException
- in the event of an encryption failurepublic static byte[] encrypt(java.lang.String key, byte[] inputBytes) throws EncryptionUtils.EncryptionException
key
- at least 24 character long key (required)inputBytes
- the bytes to encrypt (required)
EncryptionUtils.EncryptionException
- in the event of an encryption failurepublic static java.lang.String decrypt(java.lang.String key, java.lang.String inputString) throws EncryptionUtils.EncryptionException
key
- the key used to originally encrypt the string (required)inputString
- the encrypted string (required)
EncryptionUtils.EncryptionException
- in the event of an encryption failurepublic static byte[] decrypt(java.lang.String key, byte[] inputBytes) throws EncryptionUtils.EncryptionException
key
- the key used to originally encrypt the string (required)inputBytes
- the encrypted bytes (required)
EncryptionUtils.EncryptionException
- in the event of an encryption failure
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |