21.03.2017, 22:06
Quote:
Nothing special but I use it personally for some systems in my script.
PHP Code:
|
PHP Code:
hash(buf, with)
{
return buf << (with + 1);
}
unhash(buf, with)
{
return buf >> (with + 1);
}
PHP Code:
hash(8388608, 10); // 0
unhash(0, 10); // 0
PHP Code:
hash(3, 0); // 9
unhash(9, 0); // 3