anyone know how the account password or passphrase encrypted..
i'm trying this code on php
but still not workCode:$username = $_GET['username']; $password = md5($_GET['password']); $query = register($username, $password); function connect_mssql(){ $host = "127.0.0.1, 1433"; $user = "sa"; $pass = "xxxxxx"; mssql_connect($host,$user,$pass) or die ("Can't connect to db"); } function register($username, $password){ connect_mssql(); $sql = "INSERT INTO DNMembership.dbo.Accounts (AccountName, AccountLevelCode, CharacterCreateLimit, CharacterMaxCount, PublisherCode, RegisterDate, Passphrase) VALUES ('$username', '100', '4', '4', '4', GETDATE(), (CONVERT (binary(20),'$password')))"; $query = mssql_query($sql); return $query; }
i also found some hash function in sqlserver
first
secondCode:ALTER FUNCTION [dbo].[FN_HashPassphrase]( @vchPassphrase varchar(12), @IntAccountID int ) RETURNS binary(20) AS BEGIN RETURN ( HASHBYTES('SHA1', '818719D11B0B41CA80C22F5D9901E92B' + STR @IntAccountID, 10) + @vchPassphrase) ); END
also when i'm register using P_AddAccount Stored Procedure the password always return empty in the Accounts table..Code:ALTER FUNCTION [dbo].[FN_HashPassphrase2]( @vchPassphrase varchar(12), @IntAccountID int ) RETURNS binary(20) AS BEGIN RETURN ( HASHBYTES('md5',@vchPassphrase) ); END




