示例#1
0
 public function generateValidationHash($code)
 {
     $code_len = mb_strlen($code);
     for ($h = 0, $i = $code_len - 1; $i >= 0; --$i) {
         $char = mb_substr($code, $i, 1);
         $h += StringHelper::charCode($char);
     }
     return $h;
 }