pub fn validate_code(
code: &str,
alphabet_str: &str,
code_length: usize,
) -> ValidationResultExpand description
Validate a code without opening a .bin file.
This is useful for quick validation with known parameters.
§Arguments
code- The code to validatealphabet_str- Alphabet stringcode_length- Expected code length (including check digit)
§Example
use promocrypt_core::{validate_code, ValidationResult};
let result = validate_code("ABCDEFGHIJ", "0234679ABCDEFGHJKMNPQRTUXY", 10);
// result is ValidationResult::Valid or indicates the error