Skip to main content

sha256_password_rsa

Function sha256_password_rsa 

Source
pub fn sha256_password_rsa(
    _password: &str,
    _seed: &[u8],
    _public_key: &[u8],
) -> Result<Vec<u8>, String>
Expand description

Scramble password for sha256_password plugin using RSA encryption.

This is used when full authentication is required for caching_sha2_password or sha256_password plugins without TLS.

§Arguments

  • password - The user’s password
  • seed - The authentication seed from server
  • public_key - RSA public key from server (PEM format)

§Returns

The encrypted password, or error if encryption fails.

Note: This is a placeholder - RSA encryption requires additional dependencies. In practice, prefer using TLS connections which don’t require RSA encryption.