Advertisement
Guest User

Untitled

a guest
May 24th, 2011
505
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.27 KB | None | 0 0
  1. function unlockCode($imei) {
  2.   $imeiMD5 = md5($imei, true);
  3.   $unlockCode = "";
  4.  
  5.   for ($i = 0; $i < 8; $i++) {
  6.     $magicalSum = (ord($imeiMD5[$i]) + ord($imeiMD5[$i + 8])) & 0xFF;
  7.     $unlockCode .= chr(($magicalSum * 9) / 255 + 48);
  8.   }
  9.   return $unlockCode;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement