Hi,
I’ve just released my first bindings - bs-argon2.
If anyone is interested or just willing to take a look, I would appreciate any feedback on my attempt to create an idiomatic interface to the node-argon2 library.
Specifically, there are two design decisions that I’d appreciate feedback on:
- The argon2 library exposes two objects (defaults, and limits), and I ended up parsing them on load into their own respective record types. I’m wondering whether there’s a more efficient way of making such objects be available idiomatically to reason code (fields that are variants, etc.).
- The hashing function can take either a string or a buffer to hash and returns a promise that contains either a string or a buffer - depending on the ‘raw’ option passed to it. I decided to implement two different functions - one for each return type and have both take a variant as an input.
Thanks,
leeor.