forked from ethereumjs/keythereum
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplified build process; added in-browser test script
- Loading branch information
Showing
8 changed files
with
35 additions
and
71 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ test/fixtures/extra | |
test/fixtures/state | ||
test/fixtures/nodes | ||
test/fixtures/geth | ||
test/browser/bundle.js |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ global.keythereum = keythereum; | |
},{"./":2}],2:[function(require,module,exports){ | ||
(function (process,Buffer){ | ||
/** | ||
* keythereum: create/import/export ethereum keys | ||
* Create, import, and export ethereum keys. | ||
* @author Jack Peterson ([email protected]) | ||
*/ | ||
|
||
|
@@ -28878,7 +28878,7 @@ function HmacDRBG(options) { | |
this.outLen = this.hash.outSize; | ||
this.minEntropy = options.minEntropy || this.hash.hmacStrength; | ||
|
||
this.reseed = null; | ||
this._reseed = null; | ||
this.reseedInterval = null; | ||
this.K = null; | ||
this.V = null; | ||
|
@@ -28903,7 +28903,7 @@ HmacDRBG.prototype._init = function init(entropy, nonce, pers) { | |
} | ||
|
||
this._update(seed); | ||
this.reseed = 1; | ||
this._reseed = 1; | ||
this.reseedInterval = 0x1000000000000; // 2^48 | ||
}; | ||
|
||
|
@@ -28945,11 +28945,11 @@ HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) { | |
'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); | ||
|
||
this._update(entropy.concat(add || [])); | ||
this.reseed = 1; | ||
this._reseed = 1; | ||
}; | ||
|
||
HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) { | ||
if (this.reseed > this.reseedInterval) | ||
if (this._reseed > this.reseedInterval) | ||
throw new Error('Reseed is required'); | ||
|
||
// Optional encoding | ||
|
@@ -28973,7 +28973,7 @@ HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) { | |
|
||
var res = temp.slice(0, len); | ||
this._update(add); | ||
this.reseed++; | ||
this._reseed++; | ||
return utils.encode(res, enc); | ||
}; | ||
|
||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/** | ||
* keythereum: create/import/export ethereum keys | ||
* Create, import, and export ethereum keys. | ||
* @author Jack Peterson ([email protected]) | ||
*/ | ||
|
||
|
This file contains 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 file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>keythereum</title> | ||
<script> | ||
window.logger = function (o) { | ||
console.log(JSON.stringify(o, null, 2)); | ||
}; | ||
</script> | ||
</head> | ||
<body> | ||
<script src="../../dist/keythereum.js"></script> | ||
</body> | ||
<head> | ||
<title>keythereum tests</title> | ||
<link rel="stylesheet" href="../../node_modules/mocha/mocha.css"> | ||
</head> | ||
<body> | ||
<div id="mocha"></div> | ||
<script src="../../node_modules/mocha/mocha.js"></script> | ||
<script src="../../node_modules/chai/chai.js"></script> | ||
<script>mocha.setup("bdd")</script> | ||
<script src="./bundle.js"></script> | ||
<script>mocha.run();</script> | ||
</body> | ||
</html> |
This file contains 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