Handle lower-case hex in private key's salt field #179
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm using BouncyCastle (http://bouncycastle.org/) to produce public/private key pairs. In later versions of SSH.NET an exception is thrown (SshException: "Invalid private key file.") while establishing connection using the private keys previously generated.
It seems to be an issue with the regex matching the private key file data which this commit handles properly. Below is the private key data I've been using for debugging:
`-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-256-CBC,00abc69aea079727973a76b231177bef
FnaHUyvIU4pOvR7RkIQ35KlNDB1HsPmLmGzXBpNKF59ifFw1cxoMIZ1xLbDdHy63
RIGRZAQ2l+unxo7TPgRznHENvj3BzW8X71hu0B1Vkr2DETsNCI5vqI29/U20YzUw
EUzb4UBi9IyAEbQZHEjXKl36Q/FvXTWp/IQxzSzW80rn6GSENj7qJOb4tj0aLCpG
CZEF+lxESCZ+na7IPXrzTeW3sPwDBHjf6IUbPK5biurM+SU9MLYH83cf0IvESq6y
uL7uPWpzQPn4wVjTha15/0qpDD9uXJnzVfz6HENMUSdXDXWYFLCkCJUcmyA7W4X2
UZE9D0mD2TA85/FG4xS/JlWbgJRB/8LHjHQh7IfyCW5EAVA2cGUM1uSZkgIBM7rW
vh0R3GF+FK38Op97EIGvpMmIYAqYwwuNfZqJuoib8J8WhzCIHbWt7VKGMjdwGcsY
ayg1tg0vl/z4A3GobJksrirtvTTymikSitIpBAuARt3GCxj3KRnwqWc1x9lx4s9h
wW7QJnsyPDi4YY0u3Xj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