pub struct Keyring { /* private fields */ }Expand description
A parsed MySQL keyring file.
Implementations§
Source§impl Keyring
impl Keyring
Sourcepub fn from_bytes(data: &[u8]) -> Result<Self, IdbError>
pub fn from_bytes(data: &[u8]) -> Result<Self, IdbError>
Parse a keyring from raw bytes (file contents including trailing SHA-256).
Verifies the trailing SHA-256 checksum and parses all key entries with XOR de-obfuscation.
Sourcepub fn load<P: AsRef<Path>>(path: P) -> Result<Self, IdbError>
pub fn load<P: AsRef<Path>>(path: P) -> Result<Self, IdbError>
Load and parse a MySQL keyring_file from disk.
Reads the binary file, verifies the trailing SHA-256 checksum, and parses all key entries with XOR de-obfuscation.
Sourcepub fn find_key(&self, key_id: &str) -> Option<&KeyringEntry>
pub fn find_key(&self, key_id: &str) -> Option<&KeyringEntry>
Find a key entry by its full key ID string.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Keyring
impl RefUnwindSafe for Keyring
impl Send for Keyring
impl Sync for Keyring
impl Unpin for Keyring
impl UnwindSafe for Keyring
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