Merge pull request #970 from kaminskypavel/patch-1
crypto.sha256 should receive a Buffer as an input rather than a string
This commit is contained in:
commit
e0f24fdd46
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ describe('bitcoinjs-lib (addresses)', function () {
|
|||
})
|
||||
|
||||
it('can generate an address from a SHA256 hash', function () {
|
||||
var hash = bitcoin.crypto.sha256('correct horse battery staple')
|
||||
var hash = bitcoin.crypto.sha256(Buffer.from('correct horse battery staple'))
|
||||
var d = bigi.fromBuffer(hash)
|
||||
|
||||
var keyPair = new bitcoin.ECPair(d)
|
||||
|
|
Loading…
Reference in a new issue