Open 8f0d4015198521d2c2b191eabf opened 3 years ago
Is it good enough to be the example? It is not clear tho.
read -p "Enter password: " -s my_password
echo -n "$my_password" | ./argon2 saltsalt
unset my_password
And we can't use cat
, it prints new-line at the end even if it is not in the file.
I'm not sure, why not just read from the C program itself with echo
disabled?
Setting the environment variable may allow it to be read by other processes on the system. Also, since Argon2 is meant to be slow, that environment variable will be set for a decent amount of time (plenty of time for another process to access it).
Why is in the demonstrated usage, the password is passed in the command line?
echo "pwd"|./argon2 saltsalt
The command (and password) is now visible by entering the
history
command in the terminal.How can I use the executable without this problem? If I just enter
./argon2 saltsalt
and then enter the password, the program halts.I would expect the program to allow me to enter the password without echoing back to terminal.