Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DEP0005] DeprecationWarning: Buffer() is deprecated #771

Open
keiyow opened this issue Mar 3, 2021 · 0 comments
Open

[DEP0005] DeprecationWarning: Buffer() is deprecated #771

keiyow opened this issue Mar 3, 2021 · 0 comments

Comments

@keiyow
Copy link

keiyow commented Mar 3, 2021

  1. Expected behavior and actual behavior.

I got an error.

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

I think should use Buffer.from instead of new Buffer.

$ grep -nrE '[^a-zA-Z](Slow)?Buffer\s*\(' --exclude-dir node_modules/symbol-sdk/*
node_modules/symbol-sdk/dist/src/core/format/RawAddress.js:84:    const ripemdHash = new ripemd160().update(new Buffer(publicKeyHash)).digest();
node_modules/symbol-sdk/src/core/format/RawAddress.ts:86:        const ripemdHash = new ripemd160().update(new Buffer(publicKeyHash)).digest();

https://github.com/nemtech/symbol-sdk-typescript-javascript/blob/main/src/core/format/RawAddress.ts#L86

  1. Steps to reproduce the problem.

  2. Specifications like the version of the project, operating system, or hardware.

nodejs v10.24.0
sdk 0.23.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant