Encryption key string that's used to hash the password stored in the
The value is hashed when a user is saved via the
SaveUser(). Hashed passwords end in a postfix of
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.
loSecurity = CREATEOBJECT("wwUserSecurity") loSecurity.cPasswordEncryptionKey = "seekrit" *** Create a new User loSecurity.NewUser() loUser = loSecurity.oUser loUser.Username = "email@example.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("firstname.lastname@example.org","test2") this.AssertTrue(llResult,"Authentication should work") loSecurity.DeleteUser(loSecurity.oUser.Pk)
See also:Class wwUserSecurity
Comment or report problem with topic