Advertisement
krtek_net

Untitled

Apr 27th, 2014
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. function bchexdec($hex) {
  2. if(strlen($hex) == 1) {
  3. return hexdec($hex);
  4. } else {
  5. $remain = substr($hex, 0, -1);
  6. $last = substr($hex, -1);
  7. return bcadd(bcmul(16, bchexdec($remain)), hexdec($last));
  8. }
  9. }
  10.  
  11. $vyherce = bcmod(bchexdec($hash), $pocet_kandidatu) + 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement