Packagecom.smartfoxserver.v2.util
Classpublic class PasswordUtil
InheritancePasswordUtil Inheritance Object

Helper class for logging in with a pre-hashed password. This is needed if your server-side database stores User passwords hashed with MD5.



Public Methods
 MethodDefined By
  
md5Password(pass:String):String
[static] Generates the MD5 hash of the user password.
PasswordUtil
Method Detail
md5Password()method
public static function md5Password(pass:String):String

Generates the MD5 hash of the user password.

Parameters

pass:String — The plain text password.

Returns
String — The hashed password.

Example
This example shows how you can login with a hashed password:
         var userName:String = "testName";
         var userPass:String = "testPass";
         
         var md5Pass:String = PasswordUtil.md5Password(userPass);
         sfs.send(new LoginRequest(userName, md5Pass, sfs.config.zone));