Node multi-hashing phi1612
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is even with 216k155:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
crypto Updated Nov 2, 2017
scryptjane Updated Nov 2, 2017
sha3 Updated Nov 2, 2017
.gitignore Updated Nov 2, 2017
.travis.yml Added PHI1612 hashing modules Oct 3, 2017
Common.h Added PHI1612 hashing modules Oct 3, 2017
Crypto.c Added PHI1612 hashing modules Oct 3, 2017
Crypto.h Added PHI1612 hashing modules Oct 3, 2017
Lyra2.c Added PHI1612 hashing modules Oct 3, 2017
Lyra2.h Added PHI1612 hashing modules Oct 3, 2017
Lyra2RE.c Added PHI1612 hashing modules Oct 3, 2017
Lyra2RE.h Added PHI1612 hashing modules Oct 3, 2017
Lyra2REV2.c Added PHI1612 hashing modules Oct 3, 2017
Lyra2REV2.h Added PHI1612 hashing modules Oct 3, 2017
Lyra2Z.c Added PHI1612 hashing modules Oct 3, 2017
Lyra2Z.h Added PHI1612 hashing modules Oct 3, 2017
README.md Updated Nov 2, 2017
Sponge.c Added PHI1612 hashing modules Oct 3, 2017
Sponge.h Added PHI1612 hashing modules Oct 3, 2017
Util.h Added PHI1612 hashing modules Oct 3, 2017
aes_helper.c Added PHI1612 hashing modules Oct 3, 2017
bcrypt.c Added PHI1612 hashing modules Oct 3, 2017
bcrypt.h Added PHI1612 hashing modules Oct 3, 2017
binding.gyp Update binding.gyp Nov 2, 2017
blake.c Added PHI1612 hashing modules Oct 3, 2017
blake.h Added PHI1612 hashing modules Oct 3, 2017
boolberry.cc Added PHI1612 hashing modules Oct 3, 2017
boolberry.h Added PHI1612 hashing modules Oct 3, 2017
common.h Updated Nov 2, 2017
cryptonight.c Added PHI1612 hashing modules Oct 3, 2017
cryptonight.h Added PHI1612 hashing modules Oct 3, 2017
fresh.c Added PHI1612 hashing modules Oct 3, 2017
fresh.h Added PHI1612 hashing modules Oct 3, 2017
fugue.c Added PHI1612 hashing modules Oct 3, 2017
fugue.h Added PHI1612 hashing modules Oct 3, 2017
gost.c Fixed Stratum Found Block Oct 15, 2017
gost.h Fixed Stratum Found Block Oct 15, 2017
groestl.c Added PHI1612 hashing modules Oct 3, 2017
groestl.h Added PHI1612 hashing modules Oct 3, 2017
hefty1.c Added PHI1612 hashing modules Oct 3, 2017
hefty1.h Added PHI1612 hashing modules Oct 3, 2017
index.js Added PHI1612 hashing modules Oct 3, 2017
keccak.c Added PHI1612 hashing modules Oct 3, 2017
keccak.h Added PHI1612 hashing modules Oct 3, 2017
multihashing.cc Update multihashing.cc Nov 2, 2017
nist5.c Added PHI1612 hashing modules Oct 3, 2017
nist5.h Added PHI1612 hashing modules Oct 3, 2017
package.json Updated Nov 2, 2017
phi1612.c Update phi1612.c Nov 2, 2017
phi1612.h Updated Nov 2, 2017
quark.c Added PHI1612 hashing modules Oct 3, 2017
quark.h Added PHI1612 hashing modules Oct 3, 2017
qubit.c Added PHI1612 hashing modules Oct 3, 2017
qubit.h Added PHI1612 hashing modules Oct 3, 2017
scryptjane.c Added PHI1612 hashing modules Oct 3, 2017
scryptjane.h Added PHI1612 hashing modules Oct 3, 2017
scryptn.c Updated Nov 2, 2017
scryptn.h Added PHI1612 hashing modules Oct 3, 2017
sha1.c Added PHI1612 hashing modules Oct 3, 2017
sha1.h Added PHI1612 hashing modules Oct 3, 2017
sha256.h Updated Nov 2, 2017
shavite3.c Added PHI1612 hashing modules Oct 3, 2017
shavite3.h Added PHI1612 hashing modules Oct 3, 2017
skein.c Added PHI1612 hashing modules Oct 3, 2017
skein.h Added PHI1612 hashing modules Oct 3, 2017
sph_echo.c Added PHI1612 hashing modules Oct 3, 2017
sph_echo.h Added PHI1612 hashing modules Oct 3, 2017
sph_jh.c Added PHI1612 hashing modules Oct 3, 2017
sph_jh.h Added PHI1612 hashing modules Oct 3, 2017
sph_keccak.c Added PHI1612 hashing modules Oct 3, 2017
sph_keccak.h Added PHI1612 hashing modules Oct 3, 2017
sph_types.h Added PHI1612 hashing modules Oct 3, 2017
stdint.h Added PHI1612 hashing modules Oct 3, 2017
test.js Updated Nov 2, 2017
tribus.c Added PHI1612 hashing modules Oct 3, 2017
tribus.h Added PHI1612 hashing modules Oct 3, 2017
whirlpoolx.c Added PHI1612 hashing modules Oct 3, 2017
whirlpoolx.h Added PHI1612 hashing modules Oct 3, 2017
x11.c Added PHI1612 hashing modules Oct 3, 2017
x11.h Added PHI1612 hashing modules Oct 3, 2017
x13.c Added PHI1612 hashing modules Oct 3, 2017
x13.h Added PHI1612 hashing modules Oct 3, 2017
x15.c Added PHI1612 hashing modules Oct 3, 2017
x15.h Added PHI1612 hashing modules Oct 3, 2017
zr5.c Added PHI1612 hashing modules Oct 3, 2017
zr5.h Added PHI1612 hashing modules Oct 3, 2017
zr5test.cpp Added PHI1612 hashing modules Oct 3, 2017

README.md

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

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 = Buffer.from("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)