Last active
December 28, 2015 00:39
-
-
Save lholmquist/7415231 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this | |
AeroGear.crypto.getRandomValue = function() { | |
var random = new Uint32Array( 1 ); | |
crypto.getRandomValues( random ); | |
return random[ 0 ]; | |
}; | |
// can now be | |
AeroGear.Crypto = function() { | |
... | |
this.getRandomValue = function(){ ... } | |
... | |
} | |
// then this https://github.com/abstractj/aerogear-js/blob/b5ba4227a40985f9346db02fd523e7a05ea6c39c/src/crypto/aerogear.crypto.js#L18 | |
// can be a local variable | |
// Local Variables | |
var privateKey, publicKey, IV; | |
// and then https://github.com/abstractj/aerogear-js/blob/b5ba4227a40985f9346db02fd523e7a05ea6c39c/src/crypto/aerogear.crypto.js#L75 could be simplified, perhaps | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment