getpass
Password Input Helpers
Functions
| Function | Description |
|---|---|
_getpass_byte_at | Internal byte reader. |
getpass_mask | Replace each byte of input with ‘*’ (42). Returns len. |
getpass_validate_len | Check if len is between min and max inclusive. Returns 1 if valid. |
_getpass_has_digit | Internal: check if password has at least one digit. |
_getpass_has_upper | Internal: check if password has at least one uppercase letter. |
_getpass_has_lower | Internal: check if password has at least one lowercase letter. |
_getpass_has_special | Internal: check if password has at least one special character. |
getpass_strength | Compute password strength score (0-4). +1 for length >= 8, +1 for digit, +1 f… |
Details
_getpass_byte_at
fn _getpass_byte_at(buf: &i8, idx: i64) -> i64Internal byte reader.
getpass_mask
fn getpass_mask(input: &i8, len: i64, out: &i8) -> i64Replace each byte of input with ‘*’ (42). Returns len.
getpass_validate_len
fn getpass_validate_len(len: i64, min: i64, max: i64) -> i64Check if len is between min and max inclusive. Returns 1 if valid.
_getpass_has_digit
fn _getpass_has_digit(buf: &i8, len: i64) -> i64Internal: check if password has at least one digit.
_getpass_has_upper
fn _getpass_has_upper(buf: &i8, len: i64) -> i64Internal: check if password has at least one uppercase letter.
_getpass_has_lower
fn _getpass_has_lower(buf: &i8, len: i64) -> i64Internal: check if password has at least one lowercase letter.
_getpass_has_special
fn _getpass_has_special(buf: &i8, len: i64) -> i64Internal: check if password has at least one special character.
getpass_strength
fn getpass_strength(buf: &i8, len: i64) -> i64Compute password strength score (0-4). +1 for length >= 8, +1 for digit, +1 for mixed case, +1 for special char.