Encryption key string that's used to hash the password stored in the usersecurity
file's password
field.
The value is hashed when a user is saved via the SaveUser()
. Hashed passwords end in a postfix of ~~
.
o.wwUserSecurity.cPasswordEncryptionKey
Default Value
String value that is used to encode passwords for hashing. The value is further hashed and salted before writing the hashed password into the table.
Example
loSecurity = CREATEOBJECT("wwUserSecurity")
loSecurity.cPasswordEncryptionKey = "seekrit"
*** Create a new User
loSecurity.NewUser()
loUser = loSecurity.oUser
loUser.Username = "test2@west-wind.com"
loUser.Password = "test2"
loUser.FullName = "Test2 User"
lcOld = loSecurity.oUser.password
*** Saves user with encrypted password
llResult = loSecurity.SaveUser()
lcnew = loSecurity.oUser.password && Encrypted with ~~
*** Try to authenticate against encrypted DB data
llResult = loSecurity.Authenticate("test2@west-wind.com","test2")
this.AssertTrue(llResult,"Authentication should work")
loSecurity.DeleteUser(loSecurity.oUser.Pk)
See also:
Class wwUserSecurity© West Wind Technologies, 1996-2024 • Updated: 01/31/17
Comment or report problem with topic