CreateFromPkcs8 Method
CreateFromPkcs8(ReadOnlyMemory<byte>)
Creates an instance of IPublicKey from a DER-encoded public key.
C#
public static IPublicKey CreateFromPkcs8(ReadOnlyMemory<byte> encodedKey)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlyMemory<byte> | encodedKey | The DER-encoded public key. |
Returns
An instance of IPublicKey.
Exceptions
Type | Condition |
---|---|
CryptographicException | Thrown if the public key is invalid. |