Function mysql_native_password
Source pub fn mysql_native_password(password: &str, auth_data: &[u8]) -> Vec<u8> ⓘ
Expand description
Compute mysql_native_password authentication response.
Algorithm: SHA1(password) XOR SHA1(seed + SHA1(SHA1(password)))
§Arguments
password - The user’s password (UTF-8)
auth_data - The 20-byte scramble from the server
§Returns
The 20-byte authentication response, or empty vec if password is empty.