You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hash and Hmac should return Buffer not TypedArray #1313
Node specifies that Hash and Hmac digest function should return a Buffer.
Right now they return a TypedArray which is wrong.
We should fix that with the refactor in #1292
This makes sense — returning a TypedArray here seems inconsistent with the Node API expectations, especially given that Buffer is the documented return type.
Since this looks related to the refactor in #1292, I can take a look at updating hash and hmac to return Buffer instead of TypedArray, and make sure any downstream usages/tests are adjusted accordingly.
If that sounds good, I’m happy to put together a PR.
Activity
Aditya7880900936 commentedon Jan 2, 2026
This makes sense — returning a TypedArray here seems inconsistent with the Node API expectations, especially given that Buffer is the documented return type.
Since this looks related to the refactor in #1292, I can take a look at updating hash and hmac to return Buffer instead of TypedArray, and make sure any downstream usages/tests are adjusted accordingly.
If that sounds good, I’m happy to put together a PR.
Sytten commentedon Jan 2, 2026
Its a two line change, we need to wait for the modular crypto to land. It was mostly a reminder for ourselves, all good.