Package com.day.cq.commons
Class SymmetricCrypt
- java.lang.Object
-
- com.day.cq.commons.SymmetricCrypt
-
public class SymmetricCrypt extends Object
Deprecated.since 5.6 Please use granite crypto-support service instead (com.adobe.granite.crypto.CryptoSupport)SymmetricCryptprovides a symmetric encryption/decryption for storing password in the repository. the encrypted passwords are only thought for "security by obscurity" for example to hide plain text replication password, but everyone that has access to this class can decrypt them.- Since:
- 5.3
-
-
Constructor Summary
Constructors Constructor Description SymmetricCrypt()Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Stringdecrypt(String s)Deprecated.Decrypts a string that was previouslyencrypt(String)encrypted}.static Stringencrypt(String s)Deprecated.Encrypts the given string in a fairly secure way so that it can bedecryptedagain.
-
-
-
Field Detail
-
PREFIX
public static final String PREFIX
Deprecated.encryption prefix- See Also:
- Constant Field Values
-
-
Method Detail
-
encrypt
public static String encrypt(String s)
Deprecated.Encrypts the given string in a fairly secure way so that it can bedecryptedagain.- Parameters:
s- string to encrypt- Returns:
- the encrypted string with a "{AES}" prefix.
-
decrypt
public static String decrypt(String s)
Deprecated.Decrypts a string that was previouslyencrypt(String)encrypted}.- Parameters:
s- the data to decrypt- Returns:
- the string or
nullif an internal error occurred
-
-