Tech Tip: Verify password hash can be interpreted many ways
PRODUCT: 4D | VERSION: 16R5 | PLATFORM: Mac & Win
Published On: December 20, 2017
In v16R5 the 4D command Generate password hash does indeed generate a 60 character string which looks unique every time a password is entered.
Here is a sample code to generate a hash:
C_TEXT($password) C_TEXT($hash) C_OBJECT($options) $options:=New object("algorithm";"bcrypt";"cost";4) $password:=Request("Please enter your password") $hash:=Generate password hash($password;$options) |
Although the same password is entered numerous times on the command, it generates unique hashes as the following:
What is convienent in 4D is that the command Verify password hash can determine that the hash is good (True) with the same password as shown below:
See Also: