diff options
| author | Azul <azul@leap.se> | 2012-07-20 10:56:36 +0200 | 
|---|---|---|
| committer | Azul <azul@leap.se> | 2012-07-20 10:56:36 +0200 | 
| commit | 50de80c5e817476ac95a096c718a66f5555fcd05 (patch) | |
| tree | e05a25868a999557e2788a91f41da3a5a8a1a0b0 /javascript/srp_register.js | |
| parent | 07fe2d8976db0ec267bd57ded90778f0d7695478 (diff) | |
INCOMPATIBLE: major restructuring of the repository
* removed Django code - we're keeping the tests - so I hope the two can still be used together
* removed js packer - everyone has their own packaging strategy these days
* cleaned up the repository - we only have js so javascript directory does not make much sense
Diffstat (limited to 'javascript/srp_register.js')
| -rw-r--r-- | javascript/srp_register.js | 46 | 
1 files changed, 0 insertions, 46 deletions
diff --git a/javascript/srp_register.js b/javascript/srp_register.js deleted file mode 100644 index 053c4e4..0000000 --- a/javascript/srp_register.js +++ /dev/null @@ -1,46 +0,0 @@ -function SRP_REGISTER() -{ -  var that; - -  // Initiate the registration process -  SRP.prototype.register = function() -  { -    that = this; -    var handshake_url = this.geturl() + this.paths("register/salt/"); -    var params = "I="+this.getI(); -    this.ajaxRequest(handshake_url, params, this.register_receive_salt); -  }; - -  // Receive the salt for registration -  SRP.prototype.register_receive_salt = function(response) -  { -    if(response.salt) -    { -      var s = response.salt; -      var x = that.calcX(s); -      var v = that.getg().modPow(x, that.getN()); -      that.register_send_verifier(v.toString(16)); -    } -    else if(response.error) -    { -      that.error_message(response.error); -    } -  }; -  // Send the verifier to the server -  SRP.prototype.register_send_verifier = function(v) -  { -    var params = "v="+v; -    var auth_url = that.geturl() + that.paths("register/user/"); -    that.ajaxRequest(auth_url, params, that.register_user); -  }; - -  // The user has been registered successfully, now login -  SRP.prototype.register_user = function(response) -  { -    if(response.ok) -    { -      that.identify(); -    } -  };   -}; -SRP_REGISTER();  | 
