Struct sarkara::utils::RngCounter [] [src]

pub struct RngCounter<R> { /* fields omitted */ }

Rng + Counter Nonce Generater.

let mut nonce = RngCounter::new(OsRng::new().unwrap().gen::<ChaChaRng>());

let ciphertext = HHBB::seal_with_nonce(&mut nonce, &key, &plaintext);

Methods

impl<R> RngCounter<R> where R: Rng
[src]

Create a new RngCounter.

Trait Implementations

impl<R: Debug> Debug for RngCounter<R>
[src]

Formats the value using the given formatter.

impl<R: Clone> Clone for RngCounter<R>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<R> GenNonce for RngCounter<R> where R: Rng
[src]

fill nonce.