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
Use either the client
or the server
Read
functions, or
the client
or the server array functions.
Read
wrapper for Decrypter::decrypt_server_header
. Read more
Read
wrapper for Decrypter::decrypt_client_header
. Read more
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.
Write
wrapper for Encrypter::encrypt_server_header
. Read more
Write
wrapper for Encrypter::encrypt_server_header
. Read more
Convenience function for encrypting client headers. Read more