Download code/bugfind/bench/kernels/bcrypt_split/pre/src/lib.rs from viai957/align: direct link, hf CLI and curl.
- Browser
- Download file 235 Bytes
-
https://huggingface.co/viai957/align/resolve/main/code/bugfind/bench/kernels/bcrypt_split/pre/src/lib.rs
- Command line
-
hf download hf://viai957/align/code/bugfind/bench/kernels/bcrypt_split/pre/src/lib.rs
-
curl -L -o lib.rs https://huggingface.co/viai957/align/resolve/main/code/bugfind/bench/kernels/bcrypt_split/pre/src/lib.rs
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) | |
| } | |