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 UnsafeUnpin 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
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