From f4b2514e75fb8a67a3a57bd600dce54dd5c06858 Mon Sep 17 00:00:00 2001
From: Awiteb
Date: Wed, 3 Jul 2024 13:12:20 +0300
Subject: [PATCH] feat: Derive `Hash` in `PublicKey` and `Signature`
Signed-off-by: Awiteb
---
crates/oxidetalis_core/src/types/cipher.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/crates/oxidetalis_core/src/types/cipher.rs b/crates/oxidetalis_core/src/types/cipher.rs
index 9d4ad76..7f9019e 100644
--- a/crates/oxidetalis_core/src/types/cipher.rs
+++ b/crates/oxidetalis_core/src/types/cipher.rs
@@ -37,7 +37,7 @@ use crate::cipher::CipherError;
const CORRECT_LENGTH: &str = "The length is correct";
/// K256 public key
-#[derive(Clone, Copy, Debug, Eq, PartialEq)]
+#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
pub struct PublicKey([u8; 33]);
/// K256 private key
@@ -45,7 +45,7 @@ pub struct PublicKey([u8; 33]);
pub struct PrivateKey([u8; 32]);
/// OTMP signature
-#[derive(Clone, Copy, Debug, Eq, PartialEq)]
+#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
pub struct Signature {
hmac_output: [u8; 32],
timestamp: [u8; 8],