[][src]Function mojang_api::server_hash

pub fn server_hash(
    server_id: &str,
    shared_secret: [u8; 16],
    pub_key: &[u8]
) -> String

Computes the "server hash" required for authentication based on the server ID, the shared secret used for communication with the client, and the server's public RSA key.

On modern Minecraft versions, the server ID is always an empty string.

Examples

let hash = mojang_api::server_hash("", shared_secret(), pub_key());