more templating...
This commit is contained in:
@@ -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!();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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!();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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!();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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!();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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!();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user