Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/trasherdk/node-cryptonight-hashing

Cryptonight hashing functions for node.js
https://github.com/trasherdk/node-cryptonight-hashing

algorithm cryptocurrency mining-pool nodejs uplexa

Last synced: 22 days ago
JSON representation

Cryptonight hashing functions for node.js

Awesome Lists containing this project

README

        

node-cryptonight-hashing
===============

Cryptonight hashing functions for node.js.

Algorithms
----------
* cryptonight (v0, v1, v2, xtl, msr, rto, xao)
* cryptonight-upx (v1)
* cryptonight-light (v0, v1)
* cryptonight-heavy (v0, xhv, tube)

Usage
-----

Install

```bash
npm install https://github.com/uPlexa/node-cryptonight-hashing.git
```

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

```javascript
var multiHashing = require('cryptonight-hashing');

var algorithms = ['cryptonight', 'cryptonight_upx', 'cryptonight_light', 'cryptonight_heavy' ];
// Way to go with the original format. Just wow, self.

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

var hashedData = algorithms.map(function(algo){
return multiHashing[algo](data);
});

console.log(hashedData);

// [ ,
// ,
// ]

```

Credits
-------
* [XMrig](https://github.com/xmrig) - For advanced cryptonight implementations from [XMrig](https://github.com/xmrig/xmrig)