Repository navigation
OnixLabs.Security.Cryptography.IPublicKeyRawImportable
Defines a cryptographic public key that can be imported from its binary form.
| Namespace | OnixLabs.Security.Cryptography |
| Assembly | OnixLabs.Security.Cryptography.dll (NuGet) |
public interface IPublicKeyRawImportable<out T> where T : PublicKey| Parameter | Description |
|---|---|
T |
The type of PublicKey returned by the static import members. Declared covariant (out T). Must derive from PublicKey. |
IPublicKeyRawImportable<T> defines the contract for importing a public key from its raw binary representation. All import members are declared static abstract and are called on the concrete implementing type, not on an instance.
The bytesRead overloads report the number of bytes consumed from the input buffer, which is useful when deserialising a key embedded in a larger binary structure.
This interface is composed into IPublicKeyImportable<T> alongside IPublicKeyPemImportable<T>. Callers that need both import forms should depend on IPublicKeyImportable<T> rather than the two leaf interfaces individually.
| Member | Returns | Description |
|---|---|---|
Import(ReadOnlySpan<byte>) |
T |
Imports raw key bytes from a span. |
Import(ReadOnlySpan<byte>, out int) |
T |
Imports raw key bytes from a span; reports bytes read. |
Import(IBinaryConvertible) |
T |
Imports raw key bytes from an IBinaryConvertible. |
Import(IBinaryConvertible, out int) |
T |
Imports raw key bytes from an IBinaryConvertible; reports bytes read. |
public static abstract T Import(ReadOnlySpan<byte> data);
public static abstract T Import(ReadOnlySpan<byte> data, out int bytesRead);
public static abstract T Import(IBinaryConvertible data);
public static abstract T Import(IBinaryConvertible data, out int bytesRead);Imports a cryptographic public key from its raw binary representation.
| Parameter | Type | Description |
|---|---|---|
data |
ReadOnlySpan<byte> or IBinaryConvertible
|
The raw public key data to import. |
bytesRead |
out int |
(bytesRead overloads) Receives the number of bytes consumed from data. |
Returns — A new T instance containing the imported public key.
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