hash() public method

Implementation of Snapchat's hashing algorithm.
public hash ( string $first, string $second ) : string
$first string The first value to use in the hash.
$second string The second value to use in the hash.
return string The generated hash.
コード例 #1
0
ファイル: snapchat.php プロジェクト: krew25/SC-API
 /**
  * Verifies phone number.
  *
  * @param string $code
  *   Code sent for verification by Snapchat.
  *
  */
 public function verifyPhoneNumber($code)
 {
     $timestamp = parent::timestamp();
     $req_token = parent::hash(parent::STATIC_TOKEN, $timestamp);
     $result = parent::post("/bq/phone_verify", array("timestamp" => $timestamp, "action" => "verifyPhoneNumber", "username" => $this->username, "code" => $code), array($req_token, $timestamp), $multipart = false, $debug = $this->debug);
     $result = $result["data"];
     return isset($result->logged) && $result->logged;
 }