Skip to content

Commit

Permalink
Whirlpool implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
duarteroso committed Jul 26, 2020
1 parent 2865679 commit f787659
Show file tree
Hide file tree
Showing 10 changed files with 2,675 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
main
vwhirlpool
*.so
*.dylib
*.dll
21 changes: 21 additions & 0 deletions bit_width.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module vwhirlpool

//
pub fn to_u8(x u64) u16 {
return u16(byte(x & 0xff))
}

//
pub fn to_u16(x u64) u16 {
return u16(x & 0xffff)
}

//
pub fn to_u32(x u64) u32 {
return u32(x & 0xffffffff)
}

//
pub fn to_u64(x u64) u64 {
return u64(x & 0xffffffffffffffff)
}
Loading

0 comments on commit f787659

Please sign in to comment.