Namespace: hash

bp. hash

A collection of functions to hash strings.

Methods

(static) md5(string, utf8encode) → {string}

Hashes the input string using the MD5 algorithm.
Parameters:
Name Type Description
string string The string to perform md5 hash on.
utf8encode boolean Whether or not string should be encoded to UTF8 first or not.
Returns:
MD5 hash.
Type
string

(static) sha1(msg, utf8encodeopt) → {string}

Hashes the input string using the SHA1 algorithm.
Parameters:
Name Type Attributes Description
msg string The data to be hashed.
utf8encode boolean <optional>
Whether or not the data should be encoded via utf8.encode() prior to hashing.
Returns:
The hashed string
Type
string