private static function coinisvalid($coin) { if (magic::dec($coin['hash']) != $coin['token']) { return false; } return self::verifyhash($coin['token']); }
function magic(&$v, $k, $m) { switch ($m) { case "dec": $v = magic::dec($v); break; default: $v = magic::enc($v); } }