17 lines
346 B
Rust
17 lines
346 B
Rust
//! CNG private keys.
|
|
|
|
use windows_sys::Win32::Security::Cryptography;
|
|
|
|
/// A CNG handle to a key.
|
|
pub struct NcryptKey(Cryptography::NCRYPT_KEY_HANDLE);
|
|
|
|
impl Drop for NcryptKey {
|
|
fn drop(&mut self) {
|
|
unsafe {
|
|
Cryptography::NCryptFreeObject(self.0);
|
|
}
|
|
}
|
|
}
|
|
|
|
inner!(NcryptKey, Cryptography::NCRYPT_KEY_HANDLE);
|