Skip to main content

scram_client_final

Function scram_client_final 

Source
pub fn scram_client_final(
    state: AuthState,
    server_first: &[u8],
) -> Result<(AuthState, Vec<u8>)>
Expand description

Processes the server-first message and generates the client-final message.

Returns the updated auth state and the client-final message to send.

ยงErrors

Returns Error (auth) when:

  • server_first is not valid UTF-8.
  • The iteration count (i=), nonce (r=), or salt (s=) field is missing or cannot be parsed.
  • The server nonce does not start with the client-generated nonce (an anti-MITM guarantee required by the SCRAM spec).
  • The salt cannot be base64-decoded.