Skip to content

Commit c3eefbe

Browse files
authored
Merge pull request bitcoinjs#1043 from prahaladbelavadi/master
add warning for generating addresses from sha256 hash example
2 parents 93b815c + c3edc99 commit c3eefbe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/integration/addresses.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ describe('bitcoinjs-lib (addresses)', function () {
2222

2323
var keyPair = new bitcoin.ECPair(d)
2424
var address = keyPair.getAddress()
25-
25+
// Generating addresses from SHA256 hashes is not secure if the input to the hash function is predictable
26+
// Do not use with predictable inputs
2627
assert.strictEqual(address, '1C7zdTfnkzmr13HfA2vNm5SJYRK6nEKyq8')
2728
})
2829

0 commit comments

Comments
 (0)