Browse Source

Merge pull request #1043 from prahaladbelavadi/master

add warning for generating addresses from sha256 hash example
addLowRGrinding
Daniel Cousens 7 years ago
committed by GitHub
parent
commit
c3eefbef61
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      test/integration/addresses.js

3
test/integration/addresses.js

@ -22,7 +22,8 @@ describe('bitcoinjs-lib (addresses)', function () {
var keyPair = new bitcoin.ECPair(d)
var address = keyPair.getAddress()
// Generating addresses from SHA256 hashes is not secure if the input to the hash function is predictable
// Do not use with predictable inputs
assert.strictEqual(address, '1C7zdTfnkzmr13HfA2vNm5SJYRK6nEKyq8')
})

Loading…
Cancel
Save