Skip to content

OnixLabs.Security.Cryptography.IPrivateKeyExportable

matthew edited this page May 27, 2026 · 1 revision

IPrivateKeyExportable Interface

Defines a cryptographic private key that can be exported in raw binary, raw RFC 7468 PEM, PKCS #8 binary, and PKCS #8 RFC 7468 PEM forms.

Namespace OnixLabs.Security.Cryptography
Assembly OnixLabs.Security.Cryptography.dll (NuGet)
Implements IPrivateKeyRawExportable, IPrivateKeyRawPemExportable, IPrivateKeyPkcs8Exportable, IPrivateKeyPkcs8PemExportable

Definition

public interface IPrivateKeyExportable :
    IPrivateKeyRawExportable,
    IPrivateKeyRawPemExportable,
    IPrivateKeyPkcs8Exportable,
    IPrivateKeyPkcs8PemExportable;

Remarks

IPrivateKeyExportable is a convenience composition interface. It declares no members of its own; implementing it is equivalent to implementing all four constituent export interfaces. A type that implements IPrivateKeyExportable can export its key material as raw bytes (Export), algorithm-native PEM (ExportPem), PKCS #8 DER (ExportPkcs8), and PKCS #8 PEM (ExportPkcs8Pem), with optional password-based encryption where applicable.

This interface is used by IEcdhPrivateKey, IEcdsaPrivateKey, and IRsaPrivateKey. IEddsaPrivateKey does not implement this interface because EdDSA keys omit the algorithm-native raw PEM format; it instead lists the individual export capability interfaces.

See Also

ONIXLabs .NET Library


Clone this wiki locally