Package org.apache.ofbiz.base.crypto
Class HashCrypt
- java.lang.Object
-
- org.apache.ofbiz.base.crypto.HashCrypt
-
public class HashCrypt extends java.lang.Object
Utility class for doing SHA-1/PBKDF2 One-Way Hash Encryption
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CRYPT_CHAR_SET
static java.lang.String
module
-
Constructor Summary
Constructors Constructor Description HashCrypt()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static boolean
comparePassword(java.lang.String crypted, java.lang.String defaultCrypt, java.lang.String password)
static java.lang.String
cryptBytes(java.lang.String hashType, java.lang.String salt, byte[] bytes)
static java.lang.String
cryptPassword(java.lang.String hashType, java.lang.String salt, java.lang.String password)
Deprecated.static java.lang.String
cryptUTF8(java.lang.String hashType, java.lang.String salt, java.lang.String value)
static java.lang.String
cryptValue(java.lang.String hashType, java.lang.String salt, java.lang.String value)
static java.lang.String
digestHash(java.lang.String hashType, byte[] bytes)
static java.lang.String
digestHash(java.lang.String hashType, java.lang.String code, java.lang.String str)
static java.lang.String
digestHash64(java.lang.String hashType, byte[] bytes)
static java.lang.String
digestHashOldFunnyHex(java.lang.String hashType, java.lang.String str)
static boolean
doComparePbkdf2(java.lang.String crypted, java.lang.String password)
static java.lang.String
getDigestHashOldFunnyHexEncode(java.lang.String str, java.lang.String hashType)
Deprecated.use digestHashOldFunnyHex(hashType, str)static java.lang.String
getHashTypeFromPrefix(java.lang.String hashString)
Deprecated.use cryptPasswordstatic java.security.MessageDigest
getMessageDigest(java.lang.String type)
static java.lang.String
pbkdf2HashCrypt(java.lang.String hashType, java.lang.String salt, java.lang.String value)
static java.lang.String
removeHashTypePrefix(java.lang.String hashString)
Deprecated.use cryptPassword
-
-
-
Field Detail
-
module
public static final java.lang.String module
-
CRYPT_CHAR_SET
public static final java.lang.String CRYPT_CHAR_SET
- See Also:
- Constant Field Values
-
-
Method Detail
-
getMessageDigest
public static java.security.MessageDigest getMessageDigest(java.lang.String type)
-
comparePassword
public static boolean comparePassword(java.lang.String crypted, java.lang.String defaultCrypt, java.lang.String password)
-
cryptPassword
@Deprecated public static java.lang.String cryptPassword(java.lang.String hashType, java.lang.String salt, java.lang.String password)
Deprecated.
-
cryptUTF8
public static java.lang.String cryptUTF8(java.lang.String hashType, java.lang.String salt, java.lang.String value)
-
cryptValue
public static java.lang.String cryptValue(java.lang.String hashType, java.lang.String salt, java.lang.String value)
-
cryptBytes
public static java.lang.String cryptBytes(java.lang.String hashType, java.lang.String salt, byte[] bytes)
-
pbkdf2HashCrypt
public static java.lang.String pbkdf2HashCrypt(java.lang.String hashType, java.lang.String salt, java.lang.String value)
-
doComparePbkdf2
public static boolean doComparePbkdf2(java.lang.String crypted, java.lang.String password)
-
digestHash
public static java.lang.String digestHash(java.lang.String hashType, java.lang.String code, java.lang.String str)
-
digestHash
public static java.lang.String digestHash(java.lang.String hashType, byte[] bytes)
-
digestHash64
public static java.lang.String digestHash64(java.lang.String hashType, byte[] bytes)
-
getHashTypeFromPrefix
@Deprecated public static java.lang.String getHashTypeFromPrefix(java.lang.String hashString)
Deprecated.use cryptPassword
-
removeHashTypePrefix
@Deprecated public static java.lang.String removeHashTypePrefix(java.lang.String hashString)
Deprecated.use cryptPassword
-
getDigestHashOldFunnyHexEncode
@Deprecated public static java.lang.String getDigestHashOldFunnyHexEncode(java.lang.String str, java.lang.String hashType)
Deprecated.use digestHashOldFunnyHex(hashType, str)
-
digestHashOldFunnyHex
public static java.lang.String digestHashOldFunnyHex(java.lang.String hashType, java.lang.String str)
-
-