File size: 1,419 Bytes
4951e76
 
 
 
 
 
 
1
2
3
4
5
6
7
8
{"item_id": "ker-bcrypt_split", "crate_dir": "../../bench/kernels/bcrypt_split/pre", "lib_name": "k_bcrypt_split_pre", "provenance": {"author": "claude-sonnet subagent, blind", "written_from": "signature + doc string only", "saw_source": false, "saw_diff": false, "saw_advisory": false},
 "properties": [
  {"id": "p1", "fn": "split_hash_salt_len", "args": [["hash", "bytes"]], "pre": "true", "post": "hash.len() == 60 || r.is_err()", "ret": "Result<usize, u8>", "basis": "A valid hash is exactly 60 ASCII bytes; every other input must give Err"},
  {"id": "p2", "fn": "split_hash_salt_len", "args": [["hash", "bytes"]], "pre": "true", "post": "match &r { Ok(n) => *n == 22 && hash.len() == 60 && hash.iter().all(|b| b.is_ascii()), Err(_) => true }", "ret": "Result<usize, u8>", "basis": "returns the salt length (22) only for a valid 60-byte ASCII hash"},
  {"id": "p3", "fn": "split_hash_salt_len", "args": [["hash", "bytes"]], "pre": "true", "post": "!(hash.len() == 60 && hash.iter().any(|b| !b.is_ascii())) || r.is_err()", "ret": "Result<usize, u8>", "basis": "non-ASCII bytes make a 60-byte input invalid, so Err"},
  {"id": "p4", "fn": "split_hash_salt_len", "args": [["hash", "bytes"]], "pre": "true", "post": "!(hash.len() == 60 && hash.iter().all(|&b| b.is_ascii_alphanumeric())) || r == Ok(22)", "ret": "Result<usize, u8>", "basis": "a 60-byte all-ASCII input is a valid hash and yields salt length 22"}
 ]}