[][src]Module ozelot::utils

Miscellaneous utility functions

Functions

chat_to_str

Parses a Chat component (given as json) into a String containing only the visible plaintext without any formatting.

create_shared_secret

Create a shared secret as used for protocol encryption

generate_rsa_key

Generate an RSA key as used by MC.

post_sha1

Given the server_id, shared_secret and server's public key, calculate the sha1 that is to be used for posting to Mojang

rsa_decrypt

Given a RSA key, and some data RSA encrypted with the key, decrypt the data

rsa_encrypt

Given a public key in DER format (the format you get it in in the EncryptionRequest packet), and some data, RSA encrypt the data

rsa_key_binary

Convert a given RSA key's public part into the DER format, i.e. the format used in the EncryptionRequest packet.

sha1

Calculate a Minecraft-style sha1