|
Whitebeam Object Definition
|
Method Description
WbString.passwordCheck()
Compare the password parameter agaist stored hash
See Also
WbString.passwordHash() Syntax
Boolean = WbString.passwordCheck(password)
Parameters
The 'WbString.passwordCheck' method takes 1 parameter:
Name | Type/Value | Range/Length | Description | password | string | | Required. Password to be tested |
Results
The 'WbString.passwordCheck' method returns Boolean:
Type/Value | Range/Length | Description |
Boolean |
  |
true if the password hashes to the same value as stored in this WbString, false otherwise.
|
Remarks This method allows an application to compare an entered password against a stored one-way-hash.
If the password provided hashes to the same value as the stored hash then this method returns true. The WbString instance must contain the hash value to which the password is to be compared. Example In order to validate a password against a stored hash you must use the 'passwordCheck()'
method on an instance of WbString:
var hash = new WbString(hashFromDatabase);
if (hash.passwordCheck(enteredPassword))
rb.page.write("Password is correct");
|
|
(loadtime : 16ms) |