Skip to content

Commit

Permalink
Merge pull request #37 from teleconsys/develop
Browse files Browse the repository at this point in the history
Implemented Hash for Point
  • Loading branch information
Revanee authored Jun 20, 2023
2 parents dab82ce + d5561b1 commit 8e72dc6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kyber-rs"
version = "0.1.0-alpha.7"
version = "0.1.0-alpha.8"
edition = "2021"
description = "A toolbox of advanced cryptographic primitives for Rust"
license = "MPL-2.0"
Expand Down
6 changes: 6 additions & 0 deletions src/group/edwards25519/point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,12 @@ impl PartialEq for Point {
}
}

impl core::hash::Hash for Point {
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
self.ge.hash(state);
}
}

impl Display for Point {
fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
write!(f, "Ed25519Point({self:#x})")
Expand Down

0 comments on commit 8e72dc6

Please sign in to comment.