Open
Description
Hi Nugine,
I'm planning to add a new charset support to simd-base32, and is stuck with the alsw decoder implementation.
Given that the charset is:
const BASE32CROCKFORD_CHARSET: &[u8; 32] = b"0123456789ABCDEFGHJKMNPQRSTVWXYZ";
I have the decode function as:
#[inline]
const fn decode(c: u8) -> u8 {
match c {
b'0'..=b'9' => c - b'0',
b'A'..=b'H' => c - b'A' + 10,
b'J'..=b'K' => c - b'J' + 18,
b'M'..=b'N' => c - b'M' + 20,
b'P'..=b'T' => c - b'P' + 22,
b'V'..=b'Z' => c - b'V' + 27,
_ => 0xff,
}
}
But it is unclear to me how the check_hash function is implemented. Would you please add some documentation to the implementation and the verification of such functions?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels