Package org.nuxeo.ecm.directory
Class PasswordHelper
java.lang.Object
org.nuxeo.ecm.directory.PasswordHelper
Helper to check passwords and generated hashed salted ones.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]digestWithSalt(String password, byte[] salt, String algorithm) static StringhashPassword(String password, String algorithm) Returns the hashed string for a password according to a given hashing algorithm.static booleanChecks if a password is already hashed.static booleanverifyPassword(String password, String hashedPassword) Verify a password against a hashed password.
-
Field Details
-
SSHA
- See Also:
-
SSHA512
- Since:
- 2021.13
- See Also:
-
SMD5
- See Also:
-
-
Method Details
-
isHashed
Checks if a password is already hashed.- Returns:
trueif the password is hashed
-
hashPassword
Returns the hashed string for a password according to a given hashing algorithm. -
verifyPassword
Verify a password against a hashed password.If the hashed password is
nullthen the verification always fails.- Parameters:
password- the password to verifyhashedPassword- the hashed password- Returns:
trueif the password matches
-
digestWithSalt
-