#!/usr/bin/php $userlogin); $AuthChallenge = $client->GetChallenge($args); $PasswordSalt = ($AuthChallenge->GetChallengeResult->PasswordSalt); $Challenge = ($AuthChallenge->GetChallengeResult->Challenge); $unpackedSalt = unpack("H*",$PasswordSalt); $unpackedChallenge = unpack("H*",$Challenge); $packedChallenge = pack("H*",$unpackedChallenge[1]); $utfPass = unpack("H*",utf8_encode($userpass)); $combo = pack("H*",$unpackedSalt[1].$utfPass[1]); $pwHash = hash("sha256",$combo); $combo2 = pack("H*",$unpackedChallenge[1].$pwHash); $Proof = hash("sha256",$combo2); $packedProof = pack("H*",$Proof); $args = array ('challenge' => $packedChallenge, 'proof' => $packedProof); $AuthToken = $client->Authenticate($args); print_r($AuthToken); ?>