Getting MD5 Hash String in Deno

deno
Published on April 6, 2021

In Deno MD5 hash of a given string can be created using the hash library. This is a standard library which is reviewed by the Deno team.

import { createHash } from "https://deno.land/std@0.91.0/hash/mod.ts";

// input string
let str = "1234567890";

// create new hash instance
let hash = createHash("md5");
hash.update(str);
let hashed_str = hash.toString();

// "e807f1fcf82d132f9bb018ca6738a19f"
console.log(hashed_str);
In this Tutorial
    Comments
    Loading Comments