pub struct KeyLog { /* private fields */ }Expand description
Parsed SSLKEYLOGFILE indexed by client_random for fast lookup.
Implementations§
Source§impl KeyLog
impl KeyLog
Sourcepub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self, KeyLogError>
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self, KeyLogError>
Parse a KeyLog from file.
Sourcepub fn parse(content: &str) -> Result<Self, KeyLogError>
pub fn parse(content: &str) -> Result<Self, KeyLogError>
Parse a KeyLog from a string.
Sourcepub fn from_reader<R: Read>(reader: R) -> Result<Self, KeyLogError>
pub fn from_reader<R: Read>(reader: R) -> Result<Self, KeyLogError>
Parse a KeyLog from any reader.
Sourcepub fn lookup(&self, client_random: &[u8; 32]) -> Option<&KeyLogEntries>
pub fn lookup(&self, client_random: &[u8; 32]) -> Option<&KeyLogEntries>
Look up entries by client_random.
Sourcepub fn lookup_slice(&self, client_random: &[u8]) -> Option<&KeyLogEntries>
pub fn lookup_slice(&self, client_random: &[u8]) -> Option<&KeyLogEntries>
Look up entries by client_random slice (converts to array).
Sourcepub fn session_count(&self) -> usize
pub fn session_count(&self) -> usize
Get the number of unique sessions (client_randoms) in the keylog.
Sourcepub fn entry_count(&self) -> usize
pub fn entry_count(&self) -> usize
Get the total number of entries parsed.
Sourcepub fn client_randoms(&self) -> impl Iterator<Item = &[u8; 32]>
pub fn client_randoms(&self) -> impl Iterator<Item = &[u8; 32]>
Iterate over all client_randoms.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeyLog
impl RefUnwindSafe for KeyLog
impl Send for KeyLog
impl Sync for KeyLog
impl Unpin for KeyLog
impl UnwindSafe for KeyLog
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