-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Factor out the implementations and re-add the existing constructor #1
Conversation
Just add a code review on the original PR if needed. |
I figured I should do the work rather than asking it of you.
I'm cautious about breaking changes.
It is a different implementation than the other modes. It doesn't seem weird to me. |
test/Renci.SshNet.Tests/Classes/Security/Cryptography/Ciphers/AesCipherTest.Gen.cs.txt
Outdated
Show resolved
Hide resolved
src/Renci.SshNet/Security/Cryptography/Ciphers/AesCipher.CtrImpl.cs
Outdated
Show resolved
Hide resolved
{ | ||
var keySize = key.Length * 8; | ||
|
||
if (keySize is not (256 or 192 or 128)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not leave this check in place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The S.S.C.Aes
object will perform the same check
Rob, I like this refactoring as it makes the code cleaner, and we did discuss refactoring CTR into its own class. Please make the small edits and I'll merge it in. |
Oh dear, I shouldn't have merged develop into this branch. Will revert. |
2926aa1
to
36cea67
Compare
This brings it closer to the shape described in sshnet#865 (comment). I figured it was easier to show than tell.
There are no functional changes.
I have further feedback after this. Would you prefer I address them in PRs like this one or leave as a review for you to address?
Thanks
P.S for the avoidance of doubt: this PR targets your PR branch so if you merge this it will show up automatically in sshnet#865