10 lines
297 B
PHP
10 lines
297 B
PHP
<?php
|
|
|
|
function gen_team_hash($gsalt, $cid, $team_token) {
|
|
//you should verify the variable $team_token before calling this function!
|
|
$csalt = hash("sha256", $gsalt."::".$cid);
|
|
$thash = hash("sha256", $csalt."::".$team_token);
|
|
$thash = substr($thash, 12, 12);
|
|
return $thash;
|
|
}
|