I want to take a password from user in console, then derive a key from that password.
In Java, we can store passwords in a char array and zeroize the array after use.
What is the right way of doing this in nodejs where no extra copies of the password are created in memory and the password is garbage collected as soon as possible.
In simple terms, how to securely handle sensisitve data such as passwords and keys in a nodejs application?
(assume that I am making a cli desktop app entirely in nodejs and typescript/javascript without any 3rd party libraries)