pub struct AesState {
pub key: [u8; 32],
pub v: [u8; 16],
pub reseed_counter: i32,
}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: i32Implementations§
Trait Implementations§
Source§impl RNGState for AesState
impl RNGState for AesState
Source§fn 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
Source§fn 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 Freeze for AesState
impl RefUnwindSafe for AesState
impl Send for AesState
impl Sync for AesState
impl Unpin for AesState
impl UnwindSafe for AesState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more