summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-07-20 17:07:48 +0200
committerAzul <azul@leap.se>2012-07-20 17:07:48 +0200
commit0da31f678580649415cb0487c830f21d7e163253 (patch)
tree503dd57fd2471f29a2379c192f89277eb9fc2331
parent8fa0825e28828a4bd1c28b5e467578498ba54b43 (diff)
expose function to create salt
-rw-r--r--lib/srp.js5
1 files changed, 5 insertions, 0 deletions
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()
{