Whitebeam Object Definition

Site Map
 
Home
 
Application Guide
Reference
  Installation
  Configuration
  XML Markup
  JavaScript Classes
  ROM
  Templates
  Environment
  Dev Process
  Tools
  External Links
  Example libraries
Community
Contact Whitebeam
To-Do
Download
Credits
Licence
Whitebeam Users
 
 
 

Whitebeam Object Definition

Method Description

WbString.passwordHash()

Perform a password hash on the input string

See Also

WbString.passwordCheck()   

Syntax

WbString = WbString.passwordHash(password)

Parameters

The 'WbString.passwordHash' method takes 1 parameter:

Name Type/Value Range/Length Description
passwordstring  Required. Password to be encrypted

Results

The 'WbString.passwordHash' method returns WbString:

Type/Value Range/Length Description
WbString   Returns a string containing the password hash of the input password

Remarks

This method exposes the function used to encrypt (via a one-way hash) the input password. The algorithm is the same as used by the Whitebeam Contact template to store protected passwords.

Note: This is a method method on WbString and so is invoked as WbString.passwordHash(pwd);

The hashed version of the password is represented as a printable string.

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");
           
Whitebeam release 1.3.36
(loadtime : 11ms)