Trait wow_srp::header_crypto::Decrypter[][src]

pub trait Decrypter {
    fn decrypt(&mut self, data: &mut [u8]);

    fn read_and_decrypt_server_header<R: Read>(
        &mut self,
        reader: &mut R
    ) -> Result<ServerHeader> { ... }
fn read_and_decrypt_client_header<R: Read>(
        &mut self,
        reader: &mut R
    ) -> Result<ClientHeader> { ... }
fn decrypt_server_header(&mut self, data: [u8; 4]) -> ServerHeader { ... }
fn decrypt_client_header(&mut self, data: [u8; 6]) -> ClientHeader { ... } }
Expand description

The Decrypter trait allows for decrypting world packet headers.

Only the Decrypter::decrypt method is required to be implemented, the rest are provided as convenience wrappers around it.

The are no async convenience methods because it can be trivially implemented by the user, and it would be tedious to support all the different runtimes. If in doubt look at the source for the Read versions.

Required methods

Directly the encrypted data and leave the unencrypted values.

Provided methods

Convenience function for decrypting server headers.

Prefer this over directly using Decrypter::decrypt.

Convenience function for decrypting client headers.

Prefer this over directly using Decrypter::decrypt.

Implementors