Socket
Socket
Sign inDemoInstall

powtcha

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

powtcha

PoWtcha ======= sha256 Proof of Work Captcha


Version published
Weekly downloads
0
decreased by-100%
Maintainers
3
Weekly downloads
 
Created
Source

PoWtcha

sha256 Proof of Work Captcha

Usage

var salt = Buffer.from('fe23fe23fe23fe23fe23', 'hex');

PoWtcha.work(salt, PoWtcha.TARGET.EASY).then(function(res) {
    var nonce = res[0], hash = res[1];
    assert.equal(nonce, 5184);
    assert.equal(hash.toString('hex'), '000ce8507df7e6f3d173a450d74afa007b4eba74c95a57f60b8eb8e46b0f5899');
});

Development / Contributing

You should have mocha, istanbul and grunt-cli installed globally, if not run npm install -g mocha instanbul grunt-cli.
Also recommended to have phantomjs >= 1.9.8 on $PATH to speed up the asmcrypto.js build; https//github.com/Medium/phantomjs/releases/download/v1.9.19/phantomjs-1.9.8-linux-x86_64.tar.bz2

Unit Tests are created with Mocha and can be ran with npm test (or mocha)

We also run jshint and jscs, these are automatically ran by travis-ci for every commit and pull request.

jshint main.js lib/ test/ && jscs main.js lib/ test/

or simply npm run-script lint

Uglify

If you're planning to uglify/minify the javascript yourself, make sure to exclude the following variable names from being mangled:
['Buffer', 'sha256_asm', 'asm']

License

PoWtcha is released under the terms of the MIT license. See LICENCE.md for more information or see http://opensource.org/licenses/MIT.

FAQs

Package last updated on 18 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc