Skip to main content

parse_credential_line

Function parse_credential_line 

Source
pub(crate) fn parse_credential_line(
    line: &str,
) -> Option<(String, (PasswordVerifier, PermissionMode))>
Expand description

Parse a line of credential in the format of username=password or username:permission_mode=password.

The password part accepts legacy plain text and explicit verifier formats:

  • plain:<password>
  • pbkdf2_sha256:<iterations>:<hex-encoded-salt>:<hex-encoded-hash>
  • mysql_native_password:<hex-encoded-sha1-sha1-password>