Struct saltyrtc_client::crypto::AuthToken
source · [−]pub struct AuthToken(_);
Expand description
Wrapper for holding an auth token and encrypting / decrypting messages.
Implementations
sourceimpl AuthToken
impl AuthToken
sourcepub fn from_hex_str(hex_str: &str) -> SaltyResult<Self>
pub fn from_hex_str(hex_str: &str) -> SaltyResult<Self>
Create an AuthToken
instance from hex bytes.
sourcepub fn from_slice(bytes: &[u8]) -> SaltyResult<Self>
pub fn from_slice(bytes: &[u8]) -> SaltyResult<Self>
Create an AuthToken
instance from a 32 byte slice.
sourcepub fn secret_key(&self) -> &Key
pub fn secret_key(&self) -> &Key
Return a reference to the secret key.
Trait Implementations
impl Eq for AuthToken
impl StructuralEq for AuthToken
impl StructuralPartialEq for AuthToken
Auto Trait Implementations
impl RefUnwindSafe for AuthToken
impl Send for AuthToken
impl Sync for AuthToken
impl Unpin for AuthToken
impl UnwindSafe for AuthToken
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more