Search... Ctrl + K

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

Created by rossmccrann 119 days ago Used 39 times 1 Point

Hash a password with a manually generated salt.

No comments yet

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, salt_num: number) {
  const salt = await bcrypt.genSalt(salt_num);
  const hash_pass = await bcrypt.hash(password, salt);

	return hash_pass;
}

Submitted by rossmccrann 119 days ago

Edited 119 days ago

No comments yet