Modifier and Type | Field and Description |
---|---|
static String |
SALT
Static salt for hashing password.
|
Constructor and Description |
---|
JCRUser(String userName,
String hashedSaltedPassword) |
Modifier and Type | Method and Description |
---|---|
String |
getHashedSaltedPassword()
Gets salted, hashed password.
|
String |
getUserName()
Return the user name of this user
|
static String |
hashPassword(String username,
String password)
Hashes salted password.
|
boolean |
setPassword(String newPass)
Sets new password from String.
|
boolean |
verifyPassword(String pass)
Return true if pass matches password of this user.
|
public static final String SALT
public static String hashPassword(String username, String password)
username
- not nullpassword
- not nullpublic String getUserName()
User
getUserName
in interface User
public final String getHashedSaltedPassword()
public boolean setPassword(String newPass)
User
setPassword
in interface User
newPass
- the String that is the new password.public boolean verifyPassword(String pass)
User
verifyPassword
in interface User
pass
- the password to testCopyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.