Does PHP have a built in function for doing string to integer hashes, something that's difficult to reverse?
Now, I know I can probably get away with doing an md5, and treating a substring of it as a radix 16 number, but I'm looking for something built in.
Thanks.
I think the best bet would chose a standard hash [either md5()
or sha1()
] to obtain a hash of your string, and then to get an integer hash, to a base_convert($hash, 16, 10)
and that should convert your hash into a integer hash.
Hope I am understanding your issue correctly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With