Struct wow_srp::wrath_header::ProofSeed
source · pub struct ProofSeed { /* private fields */ }
Available on crate feature
wrath-header
only.Expand description
Random Seed part of the calculation needed to verify that a client knows the session key.
The ProofSeed::into_server_header_crypto
function is used by the server to verify
that a client knows the session key.
The ProofSeed::into_client_header_crypto
function is used by the client to
prove to the server that the client knows the session key.
Implementations§
source§impl ProofSeed
impl ProofSeed
sourcepub const fn seed(&self) -> u32
pub const fn seed(&self) -> u32
Either the server seed used in SMSG_AUTH_CHALLENGE
or the client
seed used in CMSG_AUTH_SESSION
.
sourcepub fn into_client_header_crypto(
self,
username: &NormalizedString,
session_key: [u8; 40],
server_seed: u32
) -> ([u8; 20], ClientCrypto)
pub fn into_client_header_crypto( self, username: &NormalizedString, session_key: [u8; 40], server_seed: u32 ) -> ([u8; 20], ClientCrypto)
Generates world server proof and ClientCrypto
.
This is not valid until the server has responded with a successful SMSG_AUTH_RESPONSE
.
sourcepub fn into_server_header_crypto(
self,
username: &NormalizedString,
session_key: [u8; 40],
client_proof: [u8; 20],
client_seed: u32
) -> Result<ServerCrypto, MatchProofsError>
pub fn into_server_header_crypto( self, username: &NormalizedString, session_key: [u8; 40], client_proof: [u8; 20], client_seed: u32 ) -> Result<ServerCrypto, 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.
Trait Implementations§
source§impl Ord for ProofSeed
impl Ord for ProofSeed
source§impl PartialEq for ProofSeed
impl PartialEq for ProofSeed
source§impl PartialOrd for ProofSeed
impl PartialOrd for ProofSeed
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for ProofSeed
impl Eq for ProofSeed
impl StructuralPartialEq for ProofSeed
Auto Trait Implementations§
impl RefUnwindSafe for ProofSeed
impl Send for ProofSeed
impl Sync for ProofSeed
impl Unpin for ProofSeed
impl UnwindSafe for ProofSeed
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.