jsrp-server-fast

0.2.3-beta.1 • Public • Published

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

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.

/jsrp-server-fast/

    Package Sidebar

    Install

    npm i jsrp-server-fast

    Weekly Downloads

    1

    Version

    0.2.3-beta.1

    License

    MIT

    Last publish

    Collaborators

    • logvinov