Browse Source
Use `Buffer.from()` instead of `new Buffer()`
patch-2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
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); |
|
|
|
|
|
|
|