Struct wow_srp::header_crypto::ProofSeed [−][src]
pub struct ProofSeed { /* fields omitted */ }
Expand description
Random Seed part of the calculation needed to verify that a client knows the session key.
The ProofSeed::into_header_crypto
function is used by the server to verify
that a client knows the session key.
The ProofSeed::into_proof_and_header_crypto
function is used by the client to
prove to the server that the client knows the session key.
Implementations
Either the server seed used in SMSG_AUTH_CHALLENGE
or the client
seed used in CMSG_AUTH_SESSION
.
pub fn into_proof_and_header_crypto(
self,
username: &NormalizedString,
session_key: [u8; 40],
server_seed: u32
) -> ([u8; 20], HeaderCrypto)
pub fn into_proof_and_header_crypto(
self,
username: &NormalizedString,
session_key: [u8; 40],
server_seed: u32
) -> ([u8; 20], HeaderCrypto)
Generates world server proof and HeaderCrypto
.
This is not valid until the server has responded with a successful SMSG_AUTH_RESPONSE
.
pub fn into_header_crypto(
self,
username: &NormalizedString,
session_key: [u8; 40],
client_proof: [u8; 20],
client_seed: u32
) -> Result<HeaderCrypto, MatchProofsError>
pub fn into_header_crypto(
self,
username: &NormalizedString,
session_key: [u8; 40],
client_proof: [u8; 20],
client_seed: u32
) -> Result<HeaderCrypto, MatchProofsError>
Asserts that the client knows the session key.
Errors
If the client_proof
does not match the server generated proof.
This should only happen if:
- There’s an error with the provided parameters.
- The session key might be out of date.
- The client is not well behaved and deliberately trying to get past the login server.