more templating...

This commit is contained in:
2025-08-10 15:20:50 -04:00
parent aa22a78630
commit 660c719b4f
5 changed files with 145 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
use super::*;
pub struct BLAKE256 {
hash: BITS256,
}
impl Hasher for BLAKE256 {
fn new() -> Self {
BLAKE256 { hash: [0; 32] }
}
fn digest(&mut self, bytes: impl AsRef<[u8]>) {
todo!()
}
fn complete(self) -> HashReturn {
todo!()
}
}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn test_blake256_hash() {
todo!();
}
}

View File

@@ -0,0 +1,29 @@
use super::*;
pub struct CRC32 {
hash: BITS32,
}
impl Hasher for CRC32 {
fn new() -> Self {
CRC32 { hash: 0 }
}
fn digest(&mut self, bytes: impl AsRef<[u8]>) {
todo!()
}
fn complete(self) -> HashReturn {
todo!()
}
}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn test_crc32_hash() {
todo!();
}
}

View File

@@ -0,0 +1,29 @@
use super::*;
pub struct SHA1 {
hash: BITS160,
}
impl Hasher for SHA1 {
fn new() -> Self {
SHA1 { hash: [0; 20] }
}
fn digest(&mut self, bytes: impl AsRef<[u8]>) {
todo!()
}
fn complete(self) -> HashReturn {
todo!()
}
}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn test_sha1_hash() {
todo!();
}
}

View File

@@ -0,0 +1,29 @@
use super::*;
pub struct SHA256 {
hash: BITS256,
}
impl Hasher for SHA256 {
fn new() -> Self {
SHA256 { hash: [0; 32] }
}
fn digest(&mut self, bytes: impl AsRef<[u8]>) {
todo!()
}
fn complete(self) -> HashReturn {
todo!()
}
}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn test_sha256_hash() {
todo!();
}
}

View File

@@ -0,0 +1,29 @@
use super::*;
pub struct SHA3_256 {
hash: BITS256,
}
impl Hasher for SHA3_256 {
fn new() -> Self {
SHA3_256 { hash: [0; 32] }
}
fn digest(&mut self, bytes: impl AsRef<[u8]>) {
todo!()
}
fn complete(self) -> HashReturn {
todo!()
}
}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn test_sha3_256_hash() {
todo!();
}
}