The MD5
module provides functions to hash strings using the MD5 algorithm.
It supports both hexadecimal and Base64 encodings.
hex(str: string): string
Creates an MD5 hash of the input string and returns it as a hexadecimal string.
Parameters:
str
: The input string to hash.Returns:
The MD5 hash encoded as a hexadecimal string.
base64(str: string): string
Creates an MD5 hash of the input string and returns it as a Base64 string.
Parameters:
str
: The input string to hash.Returns:
The MD5 hash encoded as a Base64 string.