3 ms·
I'm well versed in Rust but I think you might need to use str::from_utf8(result.as_slice()) https://docs.rs/generic-array/0.8.2/generic_array/struct.GenericAr
by McWobbleston 7y ago
I'm well versed in Rust but I think you might need to use
str::from_utf8(result.as_slice())
https://docs.rs/generic-array/0.8.2/generic_array/struct.GenericArray.html#method.as_slice https://docs.rs/generic-array/0.8.2/generic_array/struct.Gen...
https://doc.rust-lang.org/std/str/fn.from_utf8.html https://doc.rust-lang.org/std/str/fn.from_utf8.html
- kam 7y agoThat would be correct if the bytes were a string encoded in utf-8, but that's probably not the case for the output of a hash function.