Download code/bugfind/bench/kernels/bcrypt_split/post/src/lib.rs from viai957/align: direct link, hf CLI and curl.
- Browser
- Download file 340 Bytes
-
https://huggingface.co/viai957/align/resolve/main/code/bugfind/bench/kernels/bcrypt_split/post/src/lib.rs
- Command line
-
hf download hf://viai957/align/code/bugfind/bench/kernels/bcrypt_split/post/src/lib.rs
-
curl -L -o lib.rs https://huggingface.co/viai957/align/resolve/main/code/bugfind/bench/kernels/bcrypt_split/post/src/lib.rs
340 Bytes
| pub fn split_hash_salt_len(hash: &[u8]) -> Result<usize, u8> { | |
| 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) | |
| } | |