pub struct NCryptKey { /* private fields */ }
Expand description
CNG private key wrapper
Implementations§
Source§impl NCryptKey
impl NCryptKey
Sourcepub fn new_owned(handle: NCRYPT_KEY_HANDLE) -> Self
pub fn new_owned(handle: NCRYPT_KEY_HANDLE) -> Self
Create an owned instance which frees the underlying handle automatically
Sourcepub fn new_borrowed(handle: NCRYPT_KEY_HANDLE) -> Self
pub fn new_borrowed(handle: NCRYPT_KEY_HANDLE) -> Self
Create a borrowed instance which doesn’t free the key handle
Sourcepub fn algorithm_group(&self) -> Result<AlgorithmGroup>
pub fn algorithm_group(&self) -> Result<AlgorithmGroup>
Return algorithm group of the key
Sourcepub fn set_silent(&mut self, silent: bool)
pub fn set_silent(&mut self, silent: bool)
Enable or disable silent key operations without prompting the user. The default value is ‘true’.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NCryptKey
impl RefUnwindSafe for NCryptKey
impl Send for NCryptKey
impl Sync for NCryptKey
impl Unpin for NCryptKey
impl UnwindSafe for NCryptKey
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