Browse Source

Use `Buffer.from()` instead of `new Buffer()`

patch-2
Luke Childs 7 years ago
committed by GitHub
parent
commit
b85176519f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      docs/examples.md

2
docs/examples.md

@ -9,7 +9,7 @@ var address = privateKey.toAddress();
## Generate a address from a SHA256 hash
```javascript
var value = new Buffer('correct horse battery staple');
var value = Buffer.from('correct horse battery staple');
var hash = bitcore.crypto.Hash.sha256(value);
var bn = bitcore.crypto.BN.fromBuffer(hash);

Loading…
Cancel
Save