Repository navigation
OnixLabs.Security.Cryptography.IPrivateKeyPkcs8Exportable
Defines a cryptographic private key that can be exported in PKCS #8 binary form.
| Namespace | OnixLabs.Security.Cryptography |
| Assembly | OnixLabs.Security.Cryptography.dll (NuGet) |
public interface IPrivateKeyPkcs8Exportable
{
byte[] ExportPkcs8();
byte[] ExportPkcs8(ReadOnlySpan<char> password, PbeParameters parameters);
byte[] ExportPkcs8(ReadOnlySpan<byte> password, PbeParameters parameters);
}IPrivateKeyPkcs8Exportable defines the PKCS #8 binary export contract. The parameterless overload produces an unencrypted PKCS #8 DER structure. The two-argument overloads wrap the key in an encrypted PKCS #8 (EncryptedPrivateKeyInfo) structure using the supplied password and PbeParameters (which control the encryption algorithm and iteration count).
This interface is composed into IPrivateKeyExportable and is also implemented directly by IEddsaPrivateKey.
| Member | Returns | Description |
|---|---|---|
ExportPkcs8() |
byte[] |
Exports the key in PKCS #8 DER format. |
ExportPkcs8(ReadOnlySpan<char>, PbeParameters) |
byte[] |
Exports the key in encrypted PKCS #8 DER format using a char-based password. |
ExportPkcs8(ReadOnlySpan<byte>, PbeParameters) |
byte[] |
Exports the key in encrypted PKCS #8 DER format using a byte-based password. |
byte[] ExportPkcs8();
byte[] ExportPkcs8(ReadOnlySpan<char> password, PbeParameters parameters);
byte[] ExportPkcs8(ReadOnlySpan<byte> password, PbeParameters parameters);Exports the cryptographic private key data in PKCS #8 format.
| Parameter | Type | Description |
|---|---|---|
password |
ReadOnlySpan<char> or ReadOnlySpan<byte>
|
(encrypted overloads) The password used to encrypt the exported key. |
parameters |
PbeParameters |
(encrypted overloads) The password-based encryption parameters (algorithm and iteration count). |
Returns — A byte[] containing the key in PKCS #8 (or encrypted PKCS #8) DER format.
ONIXLabs .NET Library · Repository · NuGet · License (Apache-2.0)
Copyright © ONIXLabs 2020. Licensed under the Apache License, Version 2.0.
- Enumeration<T>
- Optional<T>
- OptionalEqualityComparer<T>
- OptionalExtensions
- Result
- Result<T>
- ResultEqualityComparer<T>
- ResultExtensions
- Specification<T>
- Preconditions
- IValueEquatable<T>
- IValueComparable<T>
- IBinaryConvertible
- ISpanBinaryConvertible
- IMemoryBinaryConvertible
- ArrayExtensions
- ComparableExtensions
- DateTimeExtensions
- ISpanParsableExtensions
- ObjectExtensions
- RandomExtensions
- ReadOnlySequenceExtensions
- ReadOnlySpanExtensions
- StringExtensions
- Base16
- Base32
- Base58
- Base64
- IBaseCodec
- IBaseValue
- IBaseValue<T>
- Base16Codec
- Base32Codec
- Base58Codec
- Base64Codec
- Base16FormatProvider
- Base32FormatProvider
- Base58FormatProvider
- Base64FormatProvider
- EncodingExtensions
- ReadOnlySpanExtensions
- StringBuilderExtensions
- BigDecimal
- BigDecimalEqualityComparer
- BigDecimalOrdinalityComparer
- NumberInfo
- NumberInfoEqualityComparer
- NumberInfoOrdinalityComparer
- Int256
- Int512
- UInt256
- UInt512
- Float128
- Float256
- GenericMath
- NumericsExtensions
- ConversionMode
- ScaleMode
- Hash
- NamedHash
- Sha3
- Sha3Hash224
- Sha3Hash256
- Sha3Hash384
- Sha3Hash512
- Sha3Shake128
- Sha3Shake256
- MerkleTree
- MerkleTree<T>
- PrivateKey
- PublicKey
- NamedPrivateKey
- NamedPublicKey
- EcdhPrivateKey
- EcdhPublicKey
- EcdsaPrivateKey
- EcdsaPublicKey
- EddsaPrivateKey
- EddsaPublicKey
- RsaPrivateKey
- RsaPublicKey
- DigitalSignature
- DigitalSignatureAndPublicKey
- Salt
- Secret
- ICryptoPrimitive<T>
- IHashable
- IEcdhPrivateKey
- IEcdsaPrivateKey
- IEddsaPrivateKey
- IRsaPrivateKey
- IPrivateKeyDerivable<T>
- IPrivateKeyExportable
- IPrivateKeyImportable<T>
- IPrivateKeyPemImportable<T>
- IPrivateKeyPkcs8Exportable
- IPrivateKeyPkcs8Importable<T>
- IPrivateKeyPkcs8PemExportable
- IPrivateKeyRawExportable
- IPrivateKeyRawImportable<T>
- IPrivateKeyRawPemExportable
- IEcdhPublicKey
- IEcdsaPublicKey
- IEddsaPublicKey
- IRsaPublicKey
- IPublicKeyExportable
- IPublicKeyImportable<T>
- IPublicKeyPemExportable
- IPublicKeyPemImportable<T>
- IPublicKeyRawExportable
- IPublicKeyRawImportable<T>
- HashAlgorithmExtensions
- ReadOnlySpanExtensions