All help topics · Link to this topic
Showing help on 'binary_hash()'
Syntax: binary_hash (STR bin-string) => STRstring_hash (STR text) => STR
Returns a 32-character hexadecimal string encoding the result of applying the MD5 cryptographically secure hash function to the contents of the string `text' or the binary string `bin-string'. MD5, like other such functions, has the property that, if
string_hash(x) == string_hash(y)
then, almost certainly
equal(x, y)
This can be useful, for example, in certain networking applications: after sending a large piece of text across a connection, also send across the result of applying string_hash() to the text; if the destination site also applies string_hash() to the text and gets the same result, you can be quite confident that the large text has arrived unchanged.