Skip to main content

caching_sha2_password

Function caching_sha2_password 

Source
pub fn caching_sha2_password(password: &str, auth_data: &[u8]) -> Vec<u8> 
Expand description

Compute caching_sha2_password fast authentication response.

Algorithm: XOR(SHA256(password), SHA256(SHA256(SHA256(password)) + seed))

§Arguments

  • password - The user’s password (UTF-8)
  • auth_data - The scramble from the server (typically 20 bytes + NUL)

§Returns

The 32-byte authentication response, or empty vec if password is empty.