Git Product home page Git Product logo

pevpot-stretch's Introduction

PevPot Stretch

High performance hash stretch for pevpot's provably fair lottery!

This repository includes both a node library and a stand-alone command line tool.

For the node library just grab with npm:

npm install pevpot-stretch

and use

var stetch = require('pevpot-stetch');
stetch(
  "00000000000000000ef86b27c174df6a412c0ce43eab1d532034555749294137",
  100000,
  function(err, data) {
    console.log('Stretch callback was called with: ', err, data);
  }
);

And the simple utility to stretch a blockhash for the pevpot lottery. Based on openssl with an iteration counter changed from int to long to support 64 bit iterations

Compiling

Linux: gcc -O3 stretch.c -o stretch -lssl -lcrypto

OSX: clang -O3 stretch.c -o stretch -O3 -g -Wall -I/usr/local/Cellar/openssl/1.0.2d_1/include/ -L/usr/local/Cellar/openssl/1.0.2d_1/lib -lcrypto

Usage

./stetch blockhash [iterations]

(If iterations is not provided, default to the pevpot 5 billion)

Test Vectors:

./stetch 00000000000000000ef86b27c174df6a412c0ce43eab1d532034555749294137 100000

39aed3d2eff372916100106e355384495d1794320d4c3cb4c2e0e48cc36bbd06

./stretch 000000000000000009b7fb236187f120a0c86eb8785f099a8d197dd34b9d2553

6e466cdd13cc80b1137addf46362bbe3714fc9bf7faef9aba930554d3e080ba5

Credits

pevpot-stretch's People

Watchers

 avatar  avatar

Forkers

raphaelbadia

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.