Developers.Hash.Notes2

From Shareaza Wiki
Jump to navigation Jump to search



HashToString takes an MD5 hash value and encodes it into text using base 32. If bUrn is TRUE, it prefixes the text with md5:

HashFromString and HashFromURN take base 32 text, and write the memory it describes into a MD5 hash value type. HashFromURN takes text that starts md5: while HashFromString does not.



GetHashString, HashToString, and HashToHexString all express a hash value as text. The base is 32 except for HashToHexString, which uses base 16. HashFromString and HashFromURN take base 32 text and convert it back into a hash value.

If bURN is TRUE, the methods add the prefix urn:sha1: and only HashFromURN will turn it back.