Alternate PrivateKeyFile Constructor/Implementation for Passphrases #1123
simpledrewAtWork
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Judging from the count on the pull requests, it doesn't look like many ever make it in, so I'm posing this an an improved idea. We all know that storing sensitive values as strings in memory in .NET is a really bad thing. It would be nice if we could pass a byte or char array in for the passphrase of a PrivateKeyFile instead of a string. (Sort of like the PasswordAuthenticationMethod class does.). That way we can remove (from memory) the passphrase when it is done, whereas we can't do that with .NET strings. The DecryptKey method on the PrivateKeyFile already converts the passphrase string to an array of bytes. It would be nice if it always used an array of bytes instead of a string.
Beta Was this translation helpful? Give feedback.
All reactions