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

ssh-key: have PublicKey and its parts implment Hash #145

Merged
merged 1 commit into from
Aug 11, 2023

Conversation

nresare
Copy link
Contributor

@nresare nresare commented Aug 2, 2023

Implementing the Hash trait enables using PublicKeys and relatives as HashMap keys and in HashSets.

@nresare nresare force-pushed the implement_Hash branch 3 times, most recently from 3c16d43 to 2b50241 Compare August 2, 2023 14:32
ssh-key/src/public.rs Outdated Show resolved Hide resolved
This change derives the Hash trait for PublicKey and it's constitutent
parts. Since Mpint implements its own PartialEq, an explicit Hash
implmenetation delegating to the backing byte vector is added.

A test verifying that a HashSet containing a public key can
indeed be created and queried is also added.
@tarcieri tarcieri merged commit acbcc7e into RustCrypto:master Aug 11, 2023
12 checks passed
@tarcieri
Copy link
Member

I'll probably do another pass over this before release, but the general idea can be supported

@tarcieri tarcieri mentioned this pull request Aug 13, 2023
Sign up for free to 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.

2 participants