Struct wow_srp::header_crypto::HeaderCrypto[][src]

pub struct HeaderCrypto { /* fields omitted */ }
Expand description

Main struct for encryption or decryption.

Created from ProofSeed::into_header_crypto.

Handles both encryption and decryption of headers through the Encrypter and Decrypter traits.

Can be split into a EncrypterHalf and DecrypterHalf through the HeaderCrypto::split method. This is useful if you have this struct behind a mutex and don’t want to lock both reading and writing at the same time.

Implementations

Split the HeaderCrypto into two parts for use with split connections.

It is intended for the EncrypterHalf to be stored with the write half of the connection and for the DecrypterHalf to be stored with the read half of the connection.

This is not necessary to do unless you actually can split your connections into read and write halves, and you have some reason for not just keeping the crypto together like if you don’t want locking encryption to also lock decryption in a mutex.

Trait Implementations

Formats the value using the given formatter. Read more

Use either the client or the server Read functions, or the client or the server array functions.

Convenience function for decrypting server headers. Read more

Convenience function for decrypting client headers. Read more

Use either the client or the server Write functions, or the client or the server array functions.

Convenience function for encrypting client headers. Read more

Convenience function for encrypting client headers. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.