summaryrefslogtreecommitdiff
path: root/src/srp_session.js
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2012-11-19 18:11:20 +0100
committerAzul <azul@riseup.net>2012-11-19 18:11:20 +0100
commit082f859bbdaedf4f03eb85aea9b8f88ffda2fe6d (patch)
treefd280571682a640d248c6b714c2831633031052c /src/srp_session.js
parenta41d7f306aa1dbcae17643cc9c3b457632ee8909 (diff)
further cleanup
Diffstat (limited to 'src/srp_session.js')
-rw-r--r--src/srp_session.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/srp_session.js b/src/srp_session.js
index 7f1232f..b278993 100644
--- a/src/srp_session.js
+++ b/src/srp_session.js
@@ -35,6 +35,22 @@ srp.Session = function(login, password) {
return Astr;
};
+ this.signup = function() {
+ var salt = this.getSalt();
+ return {
+ login: this.getI(),
+ password_salt: salt,
+ password_verifier: this.getV(salt).toString(16)
+ };
+ };
+
+ this.handshake = function() {
+ return {
+ login: this.getI(),
+ A: this.getAstr()
+ };
+ };
+
this.getAstr = function() {
return Astr;
}