alexmilk / scrypt

Scrypt for node and browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

scrypt

Version Mac/Linux Windows
NPM Package Build Status AppVeyor

js-standard-style

This module provides native bindings to Colin Percival's scrypt. In browser Pure JS implementation will be used.

Current scrypt version: 1.2.1

This library is experimental, so use at your own risk.

Installation

npm install scrypt

Windows

Before install scrypt you should install windows-build-tools.

API

Only one function — scrypt.

scrypt(Buffer password, Buffer salt, Number N, Number r, Number p, Number length)

  • password - key which will be hashed
  • salt - salt
  • N - number of iterations
  • r - memory factor
  • p - parallelization factor
  • length - output buffer length

USAGE

const scrypt = require('scrypt')
console.log(scrypt(Buffer.from('password'), Buffer.from('salt'), 262144, 1, 8, 32))
// <Buffer ec c9 3f 60 b9 75 00 ef d2 3a b7 f5 a7 96 7d 6d 89 2b 5d d3 07 69 49 15 bd 69 03 28 e7 11 08 de>

LICENSE

This library is free and open-source software released under the MIT license.

About

Scrypt for node and browser

License:Other


Languages

Language:C 55.5%Language:JavaScript 32.7%Language:Python 5.9%Language:C++ 4.6%Language:HTML 1.3%