new PasswordUtil()

Developers never istantiate the PasswordUtil class: only use its static properties.

Method

static

md5Password(pass) → string

Generates the MD5 hash of a user password.

Example

This example performs a login with an hashed password:

function doLogin()
{
	var userName = "testName";
	var userPass = "testPass";

	var md5Pass = SFS2X.PasswordUtil.md5Password(userPass);

	sfs.send(new SFS2X.LoginRequest(userName, md5Pass, null, sfs.config.zone));
}

Parameter

Name Type Optional Description

pass

string

 

The plain text password.

Returns

string The hashed password.