[]Trait librelic::prelude::blake2::digest::XofReader

pub trait XofReader {
    pub fn read(&mut self, buffer: &mut [u8]);

    pub fn read_boxed(&mut self, n: usize) -> Box<[u8], Global>

Notable traits for Box<R, Global>

impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
{ ... } }

Trait for describing readers which are used to extract extendable output from XOF (extendable-output function) result.

Required methods

pub fn read(&mut self, buffer: &mut [u8])

Read output into the buffer. Can be called an unlimited number of times.

Loading content...

Provided methods

pub fn read_boxed(&mut self, n: usize) -> Box<[u8], Global>

Notable traits for Box<R, Global>

impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized

Read output into a boxed slice of the specified size.

Can be called an unlimited number of times in combination with read.

Box<[u8]> is used instead of Vec<u8> to save stack space, since they have size of 2 and 3 words respectively.

Loading content...

Implementors

Loading content...