jsrp-server-fast
v0.2.3-beta.1
Published
Fast (OpenSSL) JavaScript SRP implementation for node.js only
Downloads
3
Readme
jsrp-server-fast
This package is a fork of jsrp which uses
bignum
as a big number library instead of
jsbn
Bignum
bignum
is not pure JS. It uses OpenSSL as a backend
Pros
- Performance
- Thanks to the native implementation of
powm
it's 20-30 times faster then pure JS implementation
- Thanks to the native implementation of
Cons
- It uses OpenSSL big num under the hood, so it can not be used in the browser
Installation
npm install jsrp-server-fast
Usage
var jsrp = require('jsrp-server-fast');
Example
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.
API Reference
For the API description take a look at the original jsrp repo.
Testing
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.