Fix type mismatching in crypto/hash.rs