compute a hash value for a string - Maple Help

Home : Support : Online Help : Programming : Names and Strings : StringTools Package : Miscellaneous Utilities : StringTools/Hash

StringTools[Hash] - compute a hash value for a string

 Calling Sequence Hash( s )

Parameters

 s - Maple string; string to be hashed

Description

 • The procedure Hash computes an MD5 hash, or message digest of the string s.
 • This hashed value is represented by a 32-byte string that is a hexadecimal representation of the integer value of the hash.
 • It is extremely unlikely that two distinct strings, of arbitrary length, will produce the same hashed value.

Examples

 > $\mathrm{with}\left(\mathrm{StringTools}\right):$
 > $\mathrm{Hash}\left(""\right)$
 ${"d41d8cd98f00b204e9800998ecf8427e"}$ (1)
 > $\mathrm{Hash}\left("abcde"\right)$
 ${"ab56b4d92b40713acc5af89985d4b786"}$ (2)
 > $\mathrm{Hash}\left("xxxx"\right)$
 ${"ea416ed0759d46a8de58f63a59077499"}$ (3)
 > $\mathrm{Hash}\left("xxxxx"\right)$
 ${"fb0e22c79ac75679e9881e6ba183b354"}$ (4)