Skip to main content

read_secret_stdin

Function read_secret_stdin 

Source
pub fn read_secret_stdin() -> SshCliResult<SecretString>
Expand description

Reads a password line from stdin (no extra echo).

G-IO-06: rejects payloads larger than MAX_SECRET_STDIN_BYTES with EX_DATAERR semantics via SshCliError::InvalidArgument.

G-SECDEV-01: returns SecretString immediately (rules: never keep credentials in bare String after the trust boundary). The read buffer is zeroize::Zeroizing so leftover CR/LF bytes are scrubbed on drop.