PHP has a few functions like md5(), sha1(), and hash(), that can be used to hash a string based on certain algorithms like “sha1”, “sha256”, “md5” etc.
All functions take a string as an argument and output an Alpha-Numeric hashed string.
DrupalVIP technical notebook & support