This package is a fork of jsrp which uses
bignum
as a big number library instead of
jsbn
bignum
is not pure JS. It uses OpenSSL as a backend
- Performance
- Thanks to the native implementation of
powm
it's 20-30 times faster then pure JS implementation
- Thanks to the native implementation of
- It uses OpenSSL big num under the hood, so it can not be used in the browser
npm install jsrp-server-fast
var jsrp = require('jsrp-server-fast');
For an example usage take a look at the original jsrp repo.
You should only use jsrp.server
in your code, but jsrp.client
is left for test purposes.
For the API description take a look at the original jsrp repo.
First, install the dependencies:
npm install
Also, you will need Mocha and CoffeeScript if you don't have them already:
npm install -g mocha coffee-script
Then simply run:
npm test
This library uses the same test suite as the original one, but it runs much faster (235ms
compared to 6s
on my computer) thanks to native OpenSSL bignum library used.