No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
crypto Cryptonight variant 2 support + tests (#64) Aug 28, 2018
scryptjane more Mar 30, 2014
sha3 add lbry algorithm (#68) Oct 29, 2018
tests Cryptonight variant 2 - final version (#66) Sep 22, 2018
.travis.yml Add nodejs versions to travis Apr 20, 2018
README.md add lbry algorithm (#68) Oct 29, 2018
bcrypt.c Rewrite multihashing.cc Apr 20, 2018
bcrypt.h Rewrite multihashing.cc Apr 20, 2018
binding.gyp add lbry algorithm (#68) Oct 29, 2018
blake.c Allow varying input length with scrypt, scryptn and scryptjane Apr 19, 2014
blake.h Allow varying input length with scrypt, scryptn and scryptjane Apr 19, 2014
boolberry.cc Boolberry support Jun 3, 2014
boolberry.h Boolberry support Jun 3, 2014
c11.c Add C11 Algo support (#57) May 25, 2018
c11.h Add C11 Algo support (#57) May 25, 2018
cryptonight.c Cryptonight variant 2 - final version (#66) Sep 22, 2018
cryptonight.h Monero Cryptonight variants, and add one for v7 Feb 12, 2018
cryptonight_fast.c Add Cryptonight Fast support (#60) Jun 9, 2018
cryptonight_fast.h Add Cryptonight Fast support (#60) Jun 9, 2018
fresh.c Initial FRESH support Jul 7, 2014
fresh.h Initial FRESH support Jul 7, 2014
fugue.c Initial fugue support Apr 19, 2014
fugue.h Initial fugue support Apr 19, 2014
groestl.c slight naming convention change Apr 21, 2014
groestl.h slight naming convention change Apr 21, 2014
hefty1.c Fix compiler warnings May 12, 2014
hefty1.h Initial hefty1 support Apr 19, 2014
index.js Init Mar 30, 2014
keccak.c Initial shavite3 support Apr 19, 2014
keccak.h Initial shavite3 support Apr 19, 2014
lbry.c add lbry algorithm (#68) Oct 29, 2018
lbry.h add lbry algorithm (#68) Oct 29, 2018
multihashing.cc add lbry algorithm (#68) Oct 29, 2018
neoscrypt.c Added NeoScrypt (#65) Sep 9, 2018
neoscrypt.h Added NeoScrypt (#65) Sep 9, 2018
nist5.c Added nist5 hashing Jun 14, 2014
nist5.h Added nist5 hashing Jun 14, 2014
package.json merge sha1 Jun 13, 2014
quark.c Fix compiler warnings & scrypt hashing with variable length Apr 19, 2014
quark.h Allow varying input length with scrypt, scryptn and scryptjane Apr 19, 2014
qubit.c Fix compiler warnings May 12, 2014
qubit.h Initial support for qubit Apr 19, 2014
scryptjane.c Fix deprecated import Apr 28, 2014
scryptjane.h Allow varying input length with scrypt, scryptn and scryptjane Apr 19, 2014
scryptn.c Change scrypt so that N and R values can be specified Apr 25, 2014
scryptn.h Change scrypt so that N and R values can be specified Apr 25, 2014
sha1.c rename sha1coin to sha1 Jun 13, 2014
sha1.h rename SHA1COIN_H to SHA1_H Jun 14, 2014
sha256.h Fix compiler warnings & scrypt hashing with variable length Apr 19, 2014
sha256d.c add sha256d algorithm (#67) Oct 29, 2018
sha256d.h add sha256d algorithm (#67) Oct 29, 2018
shavite3.c Fix compiler warnings May 12, 2014
shavite3.h Initial shavite3 support Apr 19, 2014
skein.c Allocate buffers on stack rather than heap Apr 21, 2014
skein.h Allow varying input length with scrypt, scryptn and scryptjane Apr 19, 2014
stdint.h Init Mar 30, 2014
x11.c Allow varying input length with scrypt, scryptn and scryptjane Apr 19, 2014
x11.h Initial shavite3 support Apr 19, 2014
x13.c Initial x13 support May 29, 2014
x13.h Initial x13 support May 29, 2014
x15.c Added initial x15 support Jun 27, 2014
x15.h Added initial x15 support Jun 27, 2014

README.md

This repo is looking for maintainers! Please reach out if interested.


node-multi-hashing

Build Status

NPM

Cryptocurrency hashing functions for node.js.

Algorithms

  • quark
  • x11
  • x13
  • nist5
  • scrypt
  • scryptn
  • scryptjane
  • keccak
  • bcrypt
  • skein
  • groestl
  • blake
  • fugue
  • qubit
  • hefty1
  • shavite3
  • cryptonight
  • boolberry
  • sha256d
  • lbry

Usage

Install

npm install multi-hashing

So far this native Node.js addon can do the following hashing algos

var multiHashing = require('multi-hashing');

var algorithms = ['quark', 'x11', 'scrypt', 'scryptn', 'scryptjane', 'keccak', 'bcrypt', 'skein', 'blake'];

var data = new Buffer("7000000001e980924e4e1109230383e66d62945ff8e749903bea4336755c00000000000051928aff1b4d72416173a8c3948159a09a73ac3bb556aa6bfbcad1a85da7f4c1d13350531e24031b939b9e2b", "hex");

var hashedData = algorithms.map(function(algo){
    if (algo === 'scryptjane'){
        //scryptjane needs block.nTime and nChainStartTime (found in coin source)
        var yaCoinChainStartTime = 1367991200;
        var nTime = Math.round(Date.now() / 1000);
        return multiHashing[algo](data, nTime, yaCoinChainStartTime);
    }
    else{
        return multiHashing[algo](data);
    }
});


console.log(hashedData);
//<SlowBuffer 0b de 16 ef 2d 92 e4 35 65 c6 6c d8 92 d9 66 b4 3d 65 ..... >

Credits

  • NSA and NIST for creation or sponsoring creation of SHA2 and SHA3 algos
  • Keccak - Guido Bertoni, Joan Daemen, Michaël Peeters, and Gilles Van Assche
  • Skein - Bruce Schneier, Stefan Lucks, Niels Ferguson, Doug Whiting, Mihir Bellare, Tadayoshi Kohno, Jon Callas and Jesse Walker.
  • BLAKE - Jean-Philippe Aumasson, Luca Henzen, Willi Meier, and Raphael C.-W. Phan
  • Grøstl - Praveen Gauravaram, Lars Knudsen, Krystian Matusiewicz, Florian Mendel, Christian Rechberger, Martin Schläffer, and Søren S. Thomsen
  • JH - Hongjun Wu
  • Fugue - Shai Halevi, William E. Hall, and Charanjit S. Jutla
  • scrypt - Colin Percival
  • bcrypt - Niels Provos and David Mazières
  • X11, Hefty1, Quark creators (they just mixed together a bunch of the above algos)