JavaScript SRP client and server implementation based on node-srp.
I replaced bignum with jsbn so it's easier to build for browser environment.
I want something that nicely works (on client and server side) and is up to date :)
Run npm i kkapron/srp
or git clone this repo and run npm i inside it to install dependencies.
API is almost the same as described in node-srp README. The main difference in the main module is that I renamed genKey() to generateRandomKey().
I also added few helper functions:
printBuffer(buf, [label])- prints given buffer on console in formatted hexprintBN(num, [label])- prints given BigInteger on console in formatted hexformatHex(s)- returns given hex string in pretty format
Run npm test
MIT