Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stripping zeros from the beginning of the hash #1

Open
bstst opened this issue Jul 22, 2016 · 1 comment
Open

Stripping zeros from the beginning of the hash #1

bstst opened this issue Jul 22, 2016 · 1 comment

Comments

@bstst
Copy link

bstst commented Jul 22, 2016

Hash for "361" should be "01ae1394", your lib outputs "1ae1394".

@bstst
Copy link
Author

bstst commented Jul 26, 2016

From http://php.net/manual/en/function.crc32.php

str_pad(dechex(crc32($str)), 8, '0', STR_PAD_LEFT)

So, basically, all we need here is left padded with zeroes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant