From 0da31f678580649415cb0487c830f21d7e163253 Mon Sep 17 00:00:00 2001 From: Azul Date: Fri, 20 Jul 2012 17:07:48 +0200 Subject: expose function to create salt --- lib/srp.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') diff --git a/lib/srp.js b/lib/srp.js index 06c9d05..0f6889b 100644 --- a/lib/srp.js +++ b/lib/srp.js @@ -42,6 +42,11 @@ function SRP() return I; }; + // some 16 byte random number + this.salt = function() { + return new BigInteger(64, rng).toString(16); + } + // Returns the XMLHttpRequest object this.getxhr = function() { -- cgit v1.2.3