node-argon2
node-argon2 copied to clipboard
Why Use Buffer?
What would be some use cases for outputting as a buffer using option {raw:true} instead of just a string?
Because a buffer is essentially a byte array, and raw output is in bytes and not characters. In other words, the output is raw data and not text. The hash, on the other hand, is a text.
Also, with buffers, you can have a byte zero (0x00) in the middle of a buffer, but strings are null-terminated (they end when you hit 0x00).