viai957's picture
Add files using upload-large-folder tool
4951e76 verified
Raw History Blame Contribute Delete
235 Bytes
fn is_char_boundary(b: u8) -> bool {
b < 128 || b >= 192
}
pub fn split_hash_salt_len(hash: &[u8]) -> Result<usize, u8> {
if hash.len() != 60 {
return Err(1);
}
assert!(is_char_boundary(hash[22]));
Ok(22)
}