πŸ”‘ scrypt

This is a pure typescript (for now - in the future this module will try to switch to wasm) asynchronous implementation of scrypt key derivation function that doesn’t require any privileges.

Warning - this implementation is new and slow. For now it might be too slow to use in production, so if you want security and can grant --allow-read, --allow-write, --allow-net, --allow-plugin and use --unstable, I’d recommend using argon2. If you don’t need the best password security, bcrypt should be faster and secure enough. There are performance improvements coming, but for now there are no good wasm scrypt implementations available, so even after this version is optimized it won’t be nearly as fast as native implementation until one is created.

Deno CI GitHub Contributors Scrypt Made by Denorg TypeScript semantic-release

⭐ Getting started

Import the hash and/or verify functions and use them:

import { hash, verify } from "https://raw.githubusercontent.com/denorg/scrypt/master/mod.ts";

const hashResult = hash("password");
const verifyResult = verify("password", hashResult);

CLI with DPX

After installing DPX, you can directly use the CLI using the dpx command:

dpx scrypt hash <password>
dpx scrypt verify <password> <hash>

CLI

Alternatively, you can use it directly from the CLI by using deno run:

deno run https://raw.githubusercontent.com/denorg/scrypt/master/cli.ts hash <password>
deno run https://raw.githubusercontent.com/denorg/scrypt/master/cli.ts verify <password> <hash>

You can also install it globally using the following:

deno install -n scrypt https://raw.githubusercontent.com/denorg/scrypt/master/cli.ts

Then, the package is available to run:

scrypt hash <password>
scrypt verify <password>

πŸ‘©β€πŸ’» Development

Run tests:

deno test

πŸ“„ License

MIT Β© Denorg

A project by Denorg, the world’s first Deno-focused community
organization and consulting company. Work with us β†’