k6

A modern load testing tool, using Go and JavaScript

"like unit testing, for performance"

k6 is a modern load testing tool, building on Load Impact's years of experience. It provides a clean, approachable JavaScript scripting API, distributed and cloud execution, and orchestration via a REST API.

Get Started    Guides

md5( input, outputEncoding )

Use md5 to hash an input string.

Parameter
Type
Description

input

string

The input string that we want to be hashed.

outputEncoding

string

Describes what type of encoding we want for the hash value. Can be "base64" or "hex".

Returns:

Type
Description

string

The string-encoded hash digest

import crypto from "k6/crypto";

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

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

Updated 2 years ago

md5( input, outputEncoding )


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.