Hash Password with Random Salt ( helper)
One script reply has been approved by the moderators Verified

Created by rossmccrann 184 days ago Viewed 634 times 1 Point

Hash a password with a randomly generated salt.

No comments yet

Login to be able to comment
Points: 0
deno
One script reply has been approved by the moderators
Ap­pro­ved
import * as wmill from "https://deno.land/x/windmill@v1.27.2/mod.ts";
import * as bcrypt from "https://deno.land/x/bcrypt@v0.2.4/mod.ts";

export async function main(password: string) {
  const salt = await bcrypt.genSalt();
  const hash_pass = await bcrypt.hash(password, salt);

	return hash_pass;
}

Submitted by rossmccrann 184 days ago

Edited 184 days ago

No comments yet

Login to be able to comment