Struct classic_mceliece_rust::AesState
source · [−]Expand description
AesState is a struct storing data of a pseudo-random number generator.
Using randombytes_init
, it can be initialized once. Using randombytes
,
one can successively fetch new pseudo-random numbers.
Fields
key: [u8; 32]
v: [u8; 16]
reseed_counter: i32
Implementations
Trait Implementations
sourceimpl RNGState for AesState
impl RNGState for AesState
sourcefn randombytes(&mut self, x: &mut [u8]) -> Result<(), Box<dyn Error>>
fn randombytes(&mut self, x: &mut [u8]) -> Result<(), Box<dyn Error>>
Fill the buffer x
with pseudo-random bytes resulting from the
AES run in counter mode updating the object state
sourcefn randombytes_init(&mut self, entropy_input: [u8; 48])
fn randombytes_init(&mut self, entropy_input: [u8; 48])
Initialize/reset the state based on the seed provided as entropy_input
impl Eq for AesState
impl StructuralPartialEq for AesState
Auto Trait Implementations
impl RefUnwindSafe for AesState
impl Send for AesState
impl Sync for AesState
impl Unpin for AesState
impl UnwindSafe for AesState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more