cryptocoinjs / hdkey

JavaScript component for Bitcoin hierarchical deterministic keys (BIP32)
MIT License
201 stars 74 forks source link

Don't promote deprecated Buffer usage in readme #28

Closed lukechilds closed 5 years ago

lukechilds commented 5 years ago

new Buffer() has been deprecated in Node.js due to surprising behaviour that can lead to major security vulnerabilities if you aren't fully aware how arguments of different type will be handled.

The example code in the readme should use Buffer.from() to avoid promoting the use of new Buffer() in userland code.

jprichardson commented 5 years ago

Yikes, thank you. Docs are pretty old here!