import { md5 } from "https://deno.land/x/ayonli_jsext@v0.9.72/hash.ts";
Calculates the MD5 hash of the given data.
NOTE: This function is not available in the browser.
Examples
Example 1
Example 1
import { md5 } from "@ayonli/jsext/hash";
const buffer = await md5("Hello, World!");
console.log(buffer); // ArrayBuffer(16) { ... }
Parameters
data: DataSource
Examples
Example 1
Example 1
import { md5 } from "@ayonli/jsext/hash";
const hex = await md5("Hello, World!", "hex");
console.log(hex); // 65a8e27d8879283831b664bd8b7f0ad4
const base64 = await md5("Hello, World!", "base64");
console.log(base64); // ZajifYh5KDgxtmS9i38K1A==
Parameters
data: DataSource