web3c.js icon indicating copy to clipboard operation
web3c.js copied to clipboard

Update use of `Buffer()`

Open armaniferrante opened this issue 6 years ago • 1 comments

Our tests output the following warning

Key Manager
(node:247) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

e.g., https://circleci.com/gh/oasislabs/web3c.js/309?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link

We should update our use of Buffer to address this warning.

armaniferrante avatar Dec 17 '18 23:12 armaniferrante

new Buffer() gets used in crypto/node/siv_ctr.js test/siv_ctr.js

i think the main reason the old api was nice is for the tests where it can auto-convert base64 data back into a binary typed array.

willscott avatar Dec 17 '18 23:12 willscott