Help with base_convert()

I’m trying to convert a base32 value from the hash of a file, such as 22DIZ2SYKRFT3QI4OEK4VWECMBVBSJ6Y, using base_convert(‘22DIZ2SYKRFT3QI4OEK4VWECMBVBSJ6Y’, 32, 16) and it is not working.

My results are 109b21729b7f48000000000000000000000 and I know this is not right.

Then PHP online manual says there are problems with base_convert() on really large numbers and am not sure if that is related to my issue.

Anybody have an idea on how to do this?

Thanks.

Any ideas on this? I want to be able to do things like download Linux distros using a P2P client (hoping to eventually build a PHP P2P type client), but those hash values are a SHA1 hash in base 32 format, but Ubuntu and others provide their SHA1 hashes in base 16. I need to be able to convert between the two bases to get things started.

Thanks.

Sponsor our Newsletter | Privacy Policy | Terms of Service