pub fn split_hash_salt_len(hash: &[u8]) -> Result { if hash.len() != 60 { return Err(1); } let mut ascii = true; let mut i = 0usize; while i < hash.len() { if hash[i] >= 128 { ascii = false; } i += 1; } if !ascii { return Err(2); } Ok(22) }