Interface IPrivateKey
- Namespace
- Yubico.YubiKey.Cryptography
- Assembly
- Yubico.YubiKey.dll
Defines the contract for cryptographic private keys.
public interface IPrivateKey : IKeyBase
- Inherited Members
- Extension Methods
Remarks
This interface extends IKeyBase to include private key-specific operations for PKCS#8 export and secure memory cleanup. Known implementations include ECPrivateKey, RSAPrivateKey and Curve25519PrivateKey,.
Methods
Clear()
Clears the buffers containing private key data.
void Clear()
ExportPkcs8PrivateKey()
Exports the current key in the PKCS#8 PrivateKeyInfo format.
byte[] ExportPkcs8PrivateKey()
Returns
- byte[]
A byte array containing the PKCS#8 PrivateKeyInfo representation of this key.