Hi ,
I'am new in use of crypto and I would like to know if it's possible to enter the password when I do " Kryptor -y 'public key' -e file to encrypt "( before the terminal ask me ) . Am I obligated ton modify PassowrdPrompt ?
When specifying a public key, Kryptor will use your private key for encryption rather than asking for a password. As for your other question, it's not possible to specify a password as part of the command because passwords shouldn't really be stored as strings. Strings are immutable in .NET and cannot be zeroed out, so I decided to store the password in a char array instead.
However, you could modify the -p|--password option to have CommandOptionType.SingleValue in the Program class. Then you'd need to make a few changes to the CommandLine class to use the string password instead of calling PasswordPrompt.
When specifying a public key, Kryptor will use your private key for encryption rather than asking for a password. As for your other question, it's not possible to specify a password as part of the command because passwords shouldn't really be stored as strings. Strings are immutable in .NET and cannot be zeroed out, so I decided to store the password in a char array instead.
However, you could modify the
-p|--password
option to haveCommandOptionType.SingleValue
in the Program class. Then you'd need to make a few changes to the CommandLine class to use the string password instead of calling PasswordPrompt.I hope that's helpful :)