Skip to content

Make keys immutable - #1264

Merged
WojciechNagorski merged 3 commits into
sshnet:developfrom
Rob-Hague:immutablekeys
Dec 21, 2023
Merged

Make keys immutable#1264
WojciechNagorski merged 3 commits into
sshnet:developfrom
Rob-Hague:immutablekeys

Conversation

@Rob-Hague

Copy link
Copy Markdown
Collaborator

This makes it easier to reason about Key instances in e.g. DigitalSignature implementations, because we know that the Key is initialised with its data and will not change.

Also fixes#1128

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I'll revisit this in a follow-up

This makes it easier to reason about Key instances in e.g.
DigitalSignature implementations, because we know that the
Key is initialised with its data and will not change.

@WojciechNagorskiWojciechNagorski left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@WojciechNagorskiWojciechNagorski left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@WojciechNagorski
WojciechNagorski merged commit 24838e6 into sshnet:developDec 21, 2023
@WojciechNagorskiWojciechNagorski added this to the 2023.0.1 milestone Dec 21, 2023
@Rob-Hague
Rob-Hague deleted the immutablekeys branch December 21, 2023 22:31
@WojciechNagorskiWojciechNagorski mentioned this pull request Dec 29, 2023
@WojciechNagorski

Copy link
Copy Markdown
Collaborator

The 2023.0.1 version has been released to Nuget: https://www.nuget.org/packages/SSH.NET/2023.0.1

This was referenced Aug 12, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Minor redesign and optimization of (Private)Key classes

2 participants

@Rob-Hague@WojciechNagorski