Skip to content
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

fix(putty): add with_comment method to public and private PuTTY keys #277

Merged
merged 3 commits into from
May 7, 2024

Conversation

pacmancoder
Copy link
Contributor

@pacmancoder pacmancoder commented May 7, 2024

This PR adds with_comment methods to PuttyPpk and PuttyPublicKey structures.

Note that those structures were immutable by design, so with_comment will always return new instance with new comment and re-calculated MAC.

Copy link
Member

@CBenoit CBenoit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we need to recalculate the MAC anyway, this approach sounds reasonable 👍
LGTM!

@CBenoit CBenoit changed the title fix(putty): Add with_comment method to public and private PuTTY keys fix(putty): add with_comment method to public and private PuTTY keys May 7, 2024
@CBenoit CBenoit merged commit 8d42515 into master May 7, 2024
10 checks passed
@CBenoit CBenoit deleted the fix/putty-set-comment branch May 7, 2024 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants