1.1.14 • Published 9 years ago

scrypt-hash v1.1.14

Weekly downloads
12
License
BSD
Repository
github
Last release
9 years ago

scrypt-hash

node bindings for crypto_scrypt from scrypt

Build Status

Example

var scrypt = require('scrypt-hash')

var password = Buffer('aprettybadpassword')
var salt = Buffer('adashofsalt')
var N = 1024 * 64
var r = 8
var p = 1
var len = 32

scrypt(password, salt, N, r, p, len, function (err, hash) {
	if (err) {
		return console.error(err)
	}
	console.assert(hash.length === len)
	console.log('The hashed password is', hash.toString('hex'))
})

scrypt(data, salt, N, r, p, len, callback)

Arguments

  • data - Buffer - the value you want to hash
  • salt - Buffer
  • N - Number - must be 32bit integer and a power of 2
  • r - Number
  • p - Number
  • len - Number - length of the returned hash
  • callback - function (err, hash)
    • err - Error
    • hash - Buffer

For info on what N, r, p do see http://tools.ietf.org/html/draft-josefsson-scrypt-kdf-01#section-5

Versioning

Major and Minor version numbers follow the scrypt C source. The Patch number of this library may differ from the upstream version as changes to either will increment this one.

License

BSD 2-Clause, Copyright 2013 Danny Coates

scrypt licensed under BSD 2-Clause, Copyright 2009 Colin Percival

1.1.14

9 years ago

1.1.13

10 years ago

1.1.12

10 years ago

1.1.11

10 years ago

1.1.10

10 years ago

1.1.9

10 years ago

1.1.8

11 years ago

1.1.7

12 years ago

1.1.6

12 years ago