Main Content

mlreportgen.utils.hash

Hash a piece of text

Description

example

outstring = mlreportgen.utils.hash(intext) generates an MD5 hash for a piece of text. An MD5 hash encodes the text into a 128-bit representation.

Examples

Hash a Piece of Text

mlreportgen.utils.hash("This is a test string to hash.")
ans = 

    "5d075889248b68d16b1fa9ad430fb4c8"

Input Arguments

collapse all

Text to hash, specified as a character vector or string scalar.

Output Arguments

collapse all

Hashed representation of original text, returned as a string scalar.

Introduced in R2018b