Enum RngType

Source
pub enum RngType {
Show 19 variants JitterEntropy, DrbgNoprHmacSha256, DrbgNoprHmacSha384, DrbgNoprHmacSha512, DrbgNoprSha256, DrbgNoprSha384, DrbgNoprSha512, DrbgNoprCtrAes128, DrbgNoprCtrAes192, DrbgNoprCtrAes256, DrbgPrHmacSha256, DrbgPrHmacSha384, DrbgPrHmacSha512, DrbgPrSha256, DrbgPrSha384, DrbgPrSha512, DrbgPrCtrAes128, DrbgPrCtrAes192, DrbgPrCtrAes256,
}
Expand description

Type of Random number Generator

Variants§

§

JitterEntropy

CPU Time Jitter Based Non-Physical True Random Number Generator (see CPU-Jitter-NPTRNG.pdf)

§

DrbgNoprHmacSha256

HMAC_DRBG based on SHA-256 without prediction resistance as specified in NIST SP800-90A-rev1

§

DrbgNoprHmacSha384

HMAC_DRBG based on SHA-384 without prediction resistance as specified in NIST SP800-90A-rev1

§

DrbgNoprHmacSha512

HMAC_DRBG based on SHA-512 without prediction resistance as specified in NIST SP800-90A-rev1

§

DrbgNoprSha256

Hash_DRBG based on SHA-256 without prediction resistance as specified in NIST SP800-90A-rev1

§

DrbgNoprSha384

Hash_DRBG based on SHA-384 without prediction resistance as specified in NIST SP800-90A-rev1

§

DrbgNoprSha512

Hash_DRBG based on SHA-512 without prediction resistance as specified in NIST SP800-90A-rev1

§

DrbgNoprCtrAes128

CTR_DRBG based on AES with 128 bits keys without prediction resistance as specified in NIST SP800-90A-rev1

§

DrbgNoprCtrAes192

CTR_DRBG based on AES with 192 bits keys without prediction resistance as specified in NIST SP800-90A-rev1

§

DrbgNoprCtrAes256

CTR_DRBG based on AES with 256 bits keys without prediction resistance as specified in NIST SP800-90A-rev1

§

DrbgPrHmacSha256

HMAC_DRBG based on SHA-256 with prediction resistance as specified in NIST SP800-90A-rev1

§

DrbgPrHmacSha384

HMAC_DRBG based on SHA-384 with prediction resistance as specified in NIST SP800-90A-rev1

§

DrbgPrHmacSha512

HMAC_DRBG based on SHA-512 with prediction resistance as specified in NIST SP800-90A-rev1

§

DrbgPrSha256

Hash_DRBG based on SHA-256 with prediction resistance as specified in NIST SP800-90A-rev1

§

DrbgPrSha384

Hash_DRBG based on SHA-384 with prediction resistance as specified in NIST SP800-90A-rev1

§

DrbgPrSha512

Hash_DRBG based on SHA-512 with prediction resistance as specified in NIST SP800-90A-rev1

§

DrbgPrCtrAes128

CTR_DRBG based on AES with 128 bits keys with prediction resistance as specified in NIST SP800-90A-rev1

§

DrbgPrCtrAes192

CTR_DRBG based on AES with 192 bits keys with prediction resistance as specified in NIST SP800-90A-rev1

§

DrbgPrCtrAes256

CTR_DRBG based on AES with 256 bits keys with prediction resistance as specified in NIST SP800-90A-rev1

Implementations§

Source§

impl RngType

Source

pub fn get_type(&self) -> &'static str

Get type str to be used as type with AF_ALG sockets

Source

pub fn get_name(&self) -> &'static str

Get name str to be used as type with AF_ALG sockets

Source

pub fn has_prediction_resistance(&self) -> bool

Whether this random generator has prediction restistance

Trait Implementations§

Source§

impl Clone for RngType

Source§

fn clone(&self) -> RngType

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.