Skip to content

Commit

Permalink
Remove unused SHA1 function; SHA1 friend codes are still supported du…
Browse files Browse the repository at this point in the history
…e to hash()

fc.php: Default PID is now 1

pid.php: Default FC is now 0214-7483-6481
  • Loading branch information
aplumafreak500 committed Dec 14, 2017
1 parent 32ed71b commit f1b92c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions fc.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

header("Content-Type: text/plain");
if (!isset($_GET["pid"])) {
$pid=gmp_init("0",10);
$pid=gmp_init("1",10);
}
else {
$pid=gmp_init($_GET["pid"], 10);
Expand Down Expand Up @@ -63,12 +63,6 @@ function CalcDS_FC($profile_id, $game_id) {
$fc=gmp_strval($return,10);
return $fc;
}
function CalcSHA1_FC($profile_id, $game_id) {
$csum = sha1(pack("V",gmp_intval($profile_id)).strrev($game_id),true);
$return=gmp_or($profile_id, gmp_shiftl((ord($csum) & 0xfe), 31));
$fc=gmp_strval($return,10);
return $fc;
}
function CalcEtc_FC($profile_id, $game_id, $method) {
$csum = hash($method, pack("V",gmp_intval($profile_id)).strrev($game_id),true);
$return=gmp_or($profile_id, gmp_shiftl((ord($csum) & 0xfe), 31));
Expand Down
2 changes: 1 addition & 1 deletion pid.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
}
if (!isset($_GET["fc"])) {
$fc=0;
$fc=gmp_init("021474836481",10);
}
else {
if ($rev==1) {
Expand Down

0 comments on commit f1b92c1

Please sign in to comment.