[][src]Struct grammers_crypto::auth_key::AuthKey

pub struct AuthKey { /* fields omitted */ }

Implementations

impl AuthKey[src]

Represents a Telegram's authorization key.

To generate a new, valid authorization key, one should use the methods provided by the generation module.

pub fn from_bytes(data: [u8; 256]) -> Self[src]

Creates a new authorization key from the given binary data.

pub fn to_bytes(&self) -> [u8; 256][src]

Converts the authorization key to a sequence of bytes, which can be loaded back later.

pub fn calc_new_nonce_hash(&self, new_nonce: &[u8; 32], number: u8) -> [u8; 16][src]

Calculates the new nonce hash based on the current attributes.

Trait Implementations

impl Clone for AuthKey[src]

impl Debug for AuthKey[src]

impl PartialEq<AuthKey> for AuthKey[src]

Auto Trait Implementations

impl RefUnwindSafe for AuthKey

impl Send for AuthKey

impl Sync for AuthKey

impl Unpin for AuthKey

impl UnwindSafe for AuthKey

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> Same<T> for T

type Output = T

Should always be Self

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.