Skip to content

A port of jBCrypt to TypeScript for use as a Deno module

License

Notifications You must be signed in to change notification settings

JamesBroadberry/deno-bcrypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BCrypt

This is a port from jBCrypt to TypeScript for use in Deno.

It has zero third-party dependencies and requires no permissions.

Import

import * as bcrypt from "https://deno.land/x/bcrypt/mod.ts";

Usage

To hash a password (with auto-generated salt):

const hash = bcrypt.hashpw("test");

To check a password:

const result = bcrypt.checkpw("test", hash);

To hash a password with a manually generated salt:

const salt = bcrypt.gensalt(8);
const hash = bcrypt.hashpw("test", salt);

Issues

For any bug reports or feature requests, please create an issue on GitHub.