bitcoinjs-lib
Advanced tools
Comparing version 1.5.4 to 1.5.5
{ | ||
"name": "bitcoinjs-lib", | ||
"version": "1.5.4", | ||
"version": "1.5.5", | ||
"description": "Client-side Bitcoin JavaScript library", | ||
@@ -49,4 +49,7 @@ "main": "./src/index.js", | ||
"bigi": "^1.4.0", | ||
"bs58check": "^1.0.4", | ||
"bs58check": "^1.0.5", | ||
"create-hash": "^1.1.0", | ||
"create-hmac": "^1.1.3", | ||
"ecurve": "^1.0.0", | ||
"randombytes": "^2.0.1", | ||
"typeforce": "^1.0.0" | ||
@@ -62,2 +65,3 @@ }, | ||
"mocha": "^2.2.0", | ||
"proxyquire": "^1.4.0", | ||
"sinon": "^1.12.2", | ||
@@ -64,0 +68,0 @@ "standard": "^2.11.0" |
@@ -1,2 +0,2 @@ | ||
var crypto = require('crypto') | ||
var createHash = require('create-hash') | ||
@@ -12,17 +12,19 @@ function hash160 (buffer) { | ||
function ripemd160 (buffer) { | ||
return crypto.createHash('rmd160').update(buffer).digest() | ||
return createHash('rmd160').update(buffer).digest() | ||
} | ||
function sha1 (buffer) { | ||
return crypto.createHash('sha1').update(buffer).digest() | ||
return createHash('sha1').update(buffer).digest() | ||
} | ||
function sha256 (buffer) { | ||
return crypto.createHash('sha256').update(buffer).digest() | ||
return createHash('sha256').update(buffer).digest() | ||
} | ||
// FIXME: Name not consistent with others | ||
var createHmac = require('create-hmac') | ||
function HmacSHA256 (buffer, secret) { | ||
console.warn('Hmac* functions are deprecated for removal in 2.0.0, use node crypto instead') | ||
return crypto.createHmac('sha256', secret).update(buffer).digest() | ||
return createHmac('sha256', secret).update(buffer).digest() | ||
} | ||
@@ -32,3 +34,3 @@ | ||
console.warn('Hmac* functions are deprecated for removal in 2.0.0, use node crypto instead') | ||
return crypto.createHmac('sha512', secret).update(buffer).digest() | ||
return createHmac('sha512', secret).update(buffer).digest() | ||
} | ||
@@ -35,0 +37,0 @@ |
var assert = require('assert') | ||
var crypto = require('crypto') | ||
var createHmac = require('create-hmac') | ||
var typeForce = require('typeforce') | ||
@@ -59,3 +59,3 @@ | ||
// Step D | ||
k = crypto.createHmac('sha256', k) | ||
k = createHmac('sha256', k) | ||
.update(v) | ||
@@ -68,6 +68,6 @@ .update(ZERO) | ||
// Step E | ||
v = crypto.createHmac('sha256', k).update(v).digest() | ||
v = createHmac('sha256', k).update(v).digest() | ||
// Step F | ||
k = crypto.createHmac('sha256', k) | ||
k = createHmac('sha256', k) | ||
.update(v) | ||
@@ -80,7 +80,7 @@ .update(ONE) | ||
// Step G | ||
v = crypto.createHmac('sha256', k).update(v).digest() | ||
v = createHmac('sha256', k).update(v).digest() | ||
// Step H1/H2a, ignored as tlen === qlen (256 bit) | ||
// Step H2b | ||
v = crypto.createHmac('sha256', k).update(v).digest() | ||
v = createHmac('sha256', k).update(v).digest() | ||
@@ -91,3 +91,3 @@ var T = BigInteger.fromBuffer(v) | ||
while ((T.signum() <= 0) || (T.compareTo(curve.n) >= 0) || !checkSig(T)) { | ||
k = crypto.createHmac('sha256', k) | ||
k = createHmac('sha256', k) | ||
.update(v) | ||
@@ -97,7 +97,7 @@ .update(ZERO) | ||
v = crypto.createHmac('sha256', k).update(v).digest() | ||
v = createHmac('sha256', k).update(v).digest() | ||
// Step H1/H2a, again, ignored as tlen === qlen (256 bit) | ||
// Step H2b again | ||
v = crypto.createHmac('sha256', k).update(v).digest() | ||
v = createHmac('sha256', k).update(v).digest() | ||
T = BigInteger.fromBuffer(v) | ||
@@ -104,0 +104,0 @@ } |
var assert = require('assert') | ||
var base58check = require('bs58check') | ||
var crypto = require('crypto') | ||
var ecdsa = require('./ecdsa') | ||
var networks = require('./networks') | ||
var randomBytes = require('randombytes') | ||
var typeForce = require('typeforce') | ||
var networks = require('./networks') | ||
@@ -50,3 +50,3 @@ var BigInteger = require('bigi') | ||
ECKey.makeRandom = function (compressed, rng) { | ||
rng = rng || crypto.randomBytes | ||
rng = rng || randomBytes | ||
@@ -53,0 +53,0 @@ var buffer = rng(32) |
var assert = require('assert') | ||
var base58check = require('bs58check') | ||
var bcrypto = require('./crypto') | ||
var crypto = require('crypto') | ||
var createHmac = require('create-hmac') | ||
var typeForce = require('typeforce') | ||
@@ -65,3 +65,3 @@ var networks = require('./networks') | ||
var I = crypto.createHmac('sha512', HDNode.MASTER_SECRET).update(seed).digest() | ||
var I = createHmac('sha512', HDNode.MASTER_SECRET).update(seed).digest() | ||
var IL = I.slice(0, 32) | ||
@@ -263,3 +263,3 @@ var IR = I.slice(32) | ||
var I = crypto.createHmac('sha512', this.chainCode).update(data).digest() | ||
var I = createHmac('sha512', this.chainCode).update(data).digest() | ||
var IL = I.slice(0, 32) | ||
@@ -266,0 +266,0 @@ var IR = I.slice(32) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
92416
2550
7
10
+ Addedcreate-hash@^1.1.0
+ Addedcreate-hmac@^1.1.3
+ Addedrandombytes@^2.0.1
+ Addedcreate-hmac@1.1.7(transitive)
+ Addedrandombytes@2.1.0(transitive)
Updatedbs58check@^1.0.5