[][src]Struct lib3h_sodium::SecureBuffer

pub struct SecureBuffer { /* fields omitted */ }

A secure buffer implementation of lib3h_crypto_api::Buffer making use of libsodium's implementation of mlock and mprotect.

Methods

impl SecureBuffer[src]

pub fn new(size: usize) -> Self[src]

Trait Implementations

impl Send for SecureBuffer[src]

impl Drop for SecureBuffer[src]

impl Clone for SecureBuffer[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Deref for SecureBuffer[src]

type Target = [u8]

The resulting type after dereferencing.

impl DerefMut for SecureBuffer[src]

impl Debug for SecureBuffer[src]

impl Buffer for SecureBuffer[src]

fn read_lock(&self) -> ReadLocker[src]

return a locker object that marks this Buffer readable until the locker goes out of scope Read more

fn write_lock(&mut self) -> WriteLocker[src]

return a locker object that marks this Buffer writable until the locker goes out of scope Read more

fn zero(&mut self)[src]

fill the buffer with zeroes

fn write(&mut self, offset: usize, data: &[u8]) -> Result<(), CryptoError>[src]

write data into this buffer at given offset this function will return CryptoError::WriteOverflow if data is too long Read more

Auto Trait Implementations

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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