[][src]Struct queen::crypto::Crypto

pub struct Crypto { /* fields omitted */ }

Methods

impl Crypto[src]

pub const NONCE_LEN: usize[src]

pub fn new(method: &Method, key: &[u8]) -> Self[src]

pub fn encrypt(&self, in_out: &mut Vec<u8>) -> Result<(), Unspecified>[src]

pub fn encrypt_message(
    crypto: &Option<Crypto>,
    message: &Message
) -> QueenResult<Vec<u8>>
[src]

pub fn decrypt(&self, in_out: &mut Vec<u8>) -> Result<(), Unspecified>[src]

pub fn decrypt_message(
    crypto: &Option<Crypto>,
    data: Vec<u8>
) -> QueenResult<Message>
[src]

pub fn init_nonce() -> [u8; 12][src]

pub fn rand_nonce() -> [u8; 12][src]

pub fn increase_nonce(nonce: &mut [u8; 12])[src]

pub fn set_nonce(nonce: &mut [u8; 12], bytes: &[u8])[src]

Trait Implementations

impl Debug for Crypto[src]

Auto Trait Implementations

impl RefUnwindSafe for Crypto

impl Send for Crypto

impl Sync for Crypto

impl Unpin for Crypto

impl UnwindSafe for Crypto

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, 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,