Make a hash structure to be used by fs
Description
The filesystem module was manipulating strings which is not ideal typing-wise when we know we are manipulating hash, thus making a hash structure
List of changes
- add a Hash struct (to have the size of hash we want)
- use it in the
main
and in the modulefs
Additional notes
- The hash struct has a size known at compile time but the struct in itself is generic
- In most of the code, the size C is set to 32 since we are using Sha256 (but we can change to another size of Hash later if we want)
- I tried to modify
Shard
infec
since its hash is aVec<u8>
and I thought it would have been better to have everything homogeneous, but it changes a lot of code, so I decided against because I thought it got out of the scope of this MR