converted to trait

This commit is contained in:
2025-06-14 20:36:40 -04:00
parent d38a506357
commit 98a90e1766
2 changed files with 11 additions and 10 deletions

View File

@@ -22,7 +22,7 @@ fn arc_u8_empty() -> ArcU8 {
}
#[derive(Debug, PartialEq)]
enum HashReturn {
pub enum HashReturn {
CRC32(BITS32),
SHA256(BITS256),
SHA3_256(BITS256),
@@ -44,9 +44,10 @@ impl HashReturn {
}
}
enum HashOp {
Digest(ArcU8),
Complete,
pub trait Hasher {
fn new() -> Self;
fn digest(&mut self, bytes: ArcU8);
fn complete(self) -> HashReturn;
}
struct HashKeeper {}