java.lang.Object
org.seppiko.commons.utils.crypto.PHCFormatUtil
PHC(Password Hashing Competition) String Format utility
- Author:
- Leonard Woo
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic StringFormat to PHC Stringstatic Stringformat(PHCFormatUtil.Entity entity) Format to PHC Stringstatic PHCFormatUtil.EntityParse PHC String format
-
Method Details
-
format
public static String format(String id, String version, Map<String, Object> params, String salt, String hash) Format to PHC String$<id>[$v=<version>][$<param>=<value>(,<param>=<value>)*][$<salt>[$<hash>]]- Parameters:
id- The symbolic name for the function.version- The algorithm version. May be null or empty.params- A parameter map. May be null or empty. But value must be implementationObject.toString().salt- An encoding of the salt. May be null or empty.hash- An encoding of the hash output. May be null or empty, but must be with salt.- Returns:
- PHC String
-
format
Format to PHC String$<id>[$v=<version>][$<param>=<value>(,<param>=<value>)*][$<salt>[$<hash>]]- Parameters:
entity- PHC String Entity- Returns:
- PHC String
-
parser
Parse PHC String format- Parameters:
phc- PHC String- Returns:
- PHC String Entity
-