mirror of
https://github.com/tlsnotary/rs-merkle.git
synced 2026-01-08 22:38:07 -05:00
refactor algorithms to be unit structs
This commit is contained in:
@@ -29,7 +29,7 @@ use sha2::{digest::FixedOutput, Digest, Sha256};
|
||||
///
|
||||
/// [`Hasher`]: crate::Hasher
|
||||
#[derive(Default, Clone)]
|
||||
pub struct Sha256Algorithm {}
|
||||
pub struct Sha256Algorithm;
|
||||
|
||||
impl Hasher for Sha256Algorithm {
|
||||
type Hash = [u8; 32];
|
||||
|
||||
@@ -33,7 +33,7 @@ use sha2::{digest::FixedOutput, Digest, Sha384};
|
||||
///
|
||||
/// [`Hasher`]: crate::Hasher
|
||||
#[derive(Default, Clone)]
|
||||
pub struct Sha384Algorithm {}
|
||||
pub struct Sha384Algorithm;
|
||||
|
||||
impl Hasher for Sha384Algorithm {
|
||||
type Hash = [u8; 48];
|
||||
|
||||
Reference in New Issue
Block a user