Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

avoid var scoping issues when used in the browser

  • Loading branch information...
commit 72743ae4c540b95f1e1114c887c10037d29e1c71 1 parent 7a6f3a4
@zaach zaach authored
Showing with 9 additions and 8 deletions.
  1. +9 −8 client/crypto.js
View
17 client/crypto.js
@@ -1,3 +1,12 @@
+
+if (typeof sjcl === 'undefined') {
+ var sjcl = require('./sjcl.js');
+}
+
+if (typeof URLParse === 'undefined') {
+ var URLParse = require('./urlparse.js');
+}
+
var GombotCrypto = (function() {
// the number of rounds used in PBKDF2 to generate a stretched derived
// key from a user password.
@@ -22,14 +31,6 @@ var GombotCrypto = (function() {
DELETE: true
};
- if (typeof sjcl === 'undefined') {
- var sjcl = require('./sjcl.js');
- }
-
- if (typeof URLParse === 'undefined') {
- var URLParse = require('./urlparse.js');
- }
-
return {
seed: function(entropy, cb) {
setTimeout(cb, 0);
Please sign in to comment.
Something went wrong with that request. Please try again.