No results for ""

Powered byAlgolia

md4( input, outputEncoding )

suggest edits

Use md4 to hash an input string.

ParameterTypeDescription
inputstringThe input string to hash.
outputEncodingstringDescribes what type of encoding to use for the hash value. Can be "base64" or "hex".

Returns

TypeDescription
stringThe string-encoded hash digest

Example

import crypto from 'k6/crypto';

export default function() {
  let hash = crypto.md4('hello world!', 'hex');
  console.log(hash);
}

The above script should result in the following being printed during execution:

INFO[0000] 3363b72840acd5f49f922fef598ee85d