|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.security.Digester
public final class Digester
Encryption helper. Supported algorithm:
Field Summary | |
---|---|
static String |
MD5
|
static String |
SHA1
|
static String |
SHA256
There are five (5) FIPS-approved* algorithms for generating a condensed representation of a message (message digest): SHA-1, SHA-224, SHA-256,SHA-384, and SHA-512. |
static String |
SHA384
|
static String |
SHA512
|
Method Summary | |
---|---|
static String |
getBCrypt(String text)
|
static byte[] |
getDigest(byte[] data,
String algorithm)
|
static String |
getDigest(String data,
String algorithm)
|
static String |
getMD5Hex(String data)
Gets MD5 encoded -> hex string. |
static String |
getSHA1Hex(String data)
Gets SHA-1 encoded -> hex string. |
static boolean |
matchBCrypted(String candidate,
String hash)
|
static String |
toHEX(byte[] data)
Converts a byte array to a string Hex. |
static String |
toHEX(String data)
Converts a byte array to a string Hex. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SHA1
public static final String MD5
public static final String SHA256
public static final String SHA384
public static final String SHA512
Method Detail |
---|
public static String getDigest(String data, String algorithm) throws NoSuchAlgorithmException
NoSuchAlgorithmException
public static byte[] getDigest(byte[] data, String algorithm) throws NoSuchAlgorithmException
NoSuchAlgorithmException
public static String getSHA1Hex(String data)
public static String getMD5Hex(String data)
public static String toHEX(String data)
data
- to be converted
public static String toHEX(byte[] data)
data
- to be converted
public static String getBCrypt(String text)
public static boolean matchBCrypted(String candidate, String hash)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |