Rudxain / xorsum

Get XOR checksum with this command-line tool
https://crates.io/crates/xorsum
GNU Lesser General Public License v3.0
0 stars 1 forks source link

Init `sbox` within `xor_hasher` #12

Closed Rudxain closed 2 years ago

Rudxain commented 2 years ago

That vector is always initialized to all 0s before being passed to that fn, so it makes sense to create it there and return it after mutating, instead of passing a mutable reference and manually resetting with fill

Rudxain commented 2 years ago

I think this was a mistake. This could worsen performance when the file list is larger than 1.

Related to #16

Link to the commit that closed this as "Not Planned": https://github.com/Rudxain/xorsum/commit/b0487046a4b503fe05088f507039c37c1281bde1

Rudxain commented 2 years ago

I wish xor_hasher was a pure fn, but this is not good for the heap