File: ncrypt_key.rs

package info (click to toggle)
rust-schannel 0.1.19-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 332 kB
  • sloc: makefile: 4
file content (15 lines) | stat: -rw-r--r-- 303 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! CNG private keys.
use winapi::um::ncrypt;

/// A CNG handle to a key.
pub struct NcryptKey(ncrypt::NCRYPT_KEY_HANDLE);

impl Drop for NcryptKey {
    fn drop(&mut self) {
        unsafe {
            ncrypt::NCryptFreeObject(self.0);
        }
    }
}

inner!(NcryptKey, ncrypt::NCRYPT_KEY_HANDLE);