pub struct KemKeyReader<R: Read + Seek> {
pub reader: BufReader<R>,
pub dh_priv_key: Option<[u8; 32]>,
}Expand description
for reading a large volume of Classic McEliece public keys
Fields§
§reader: BufReader<R>§dh_priv_key: Option<[u8; 32]>for Kem + Dh hybrid
Implementations§
Source§impl<R: Read + Seek> KemKeyReader<R>
impl<R: Read + Seek> KemKeyReader<R>
Sourcepub fn new(source: R) -> Self
pub fn new(source: R) -> Self
public key reader with a buffer size of 261120.
for files that contain only McEliece public keys all in one line.
Sourcepub fn new_dh_hybrid(dh_priv_key: [u8; 32], source: R) -> Self
pub fn new_dh_hybrid(dh_priv_key: [u8; 32], source: R) -> Self
public key reader with a buffer size of 261120 + 32.
for files that contain McEliece public paired with their Diffie-Hellman counterparts (i.e Vec<…[u8; …mc_pub, …dh_pub]>)
Auto Trait Implementations§
impl<R> Freeze for KemKeyReader<R>where
R: Freeze,
impl<R> RefUnwindSafe for KemKeyReader<R>where
R: RefUnwindSafe,
impl<R> Send for KemKeyReader<R>where
R: Send,
impl<R> Sync for KemKeyReader<R>where
R: Sync,
impl<R> Unpin for KemKeyReader<R>where
R: Unpin,
impl<R> UnsafeUnpin for KemKeyReader<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for KemKeyReader<R>where
R: UnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more