sha256 wrong apis in 0.9.3
Closed this issue · 1 comments
bruceloco commented
/// Convert input string to 24 character hash
pub fn hash(input: &str) -> String {
let mut sh = Sha256::new();
sh.input(input.as_bytes());
let mut out = format!("{:x}", sh.result());
out.truncate(24);
out
}
Does not build, input and result are not registered apis
changed to
/// Convert input string to 24 character hash
pub fn hash(input: &str) -> String {
let mut sh = Sha256::new();
sh.update(input.as_bytes());
let mut out = format!("{:x}", sh.finalize());
out.truncate(24);
out
}