secrets: a putsecret CLI program
A putsecret main program with the following:
-
-B,-Zoptions forb64andzipencodings, also-Nor whatev for clear text (in case there is already another encoding) - by default, read secret from stdin, with prompt and hidden input and twice if stdin isatty
- re-use previously existing encoding, if any (must be implemented in the
putsecret()library function) - only per explicit option read a secret from the command line (-s or --secret=)
- keep the order of lines in the secrets file when re-writing
- also, keep comments and anything else untouched (except trailing whitespace in a line and trailing whitespace lines)
Also, tests for all this.
Edited by Juergen Nickelsen