[][src]Struct ssb_crypto::NetworkKey

pub struct NetworkKey(_);

32-byte network key, known by client and server. Usually NetworkKey::SSB_MAIN_NET

Methods

impl NetworkKey[src]

pub const SSB_MAIN_NET: NetworkKey[src]

pub fn random() -> NetworkKey[src]

pub fn as_slice(&self) -> &[u8][src]

pub fn from_slice(b: &[u8]) -> Option<NetworkKey>[src]

pub fn authenticate(&self, data: &[u8]) -> AuthTag[src]

pub fn verify(&self, tag: &AuthTag, data: &[u8]) -> bool[src]

pub const fn size() -> usize[src]

Trait Implementations

impl Clone for NetworkKey[src]

impl Debug for NetworkKey[src]

impl PartialEq<NetworkKey> for NetworkKey[src]

impl StructuralPartialEq for NetworkKey[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.