Show / Hide Table of Contents

PivRsaPublicKey Constructor

PivRsaPublicKey(ReadOnlySpan<byte>, ReadOnlySpan<byte>)

Create a new instance of an RSA public key object based on the given modulus and public exponent.

C#
public PivRsaPublicKey(ReadOnlySpan<byte> modulus, ReadOnlySpan<byte> publicExponent)

Parameters

Type Name Description
ReadOnlySpan<byte> modulus

The modulus as a canonical byte array. It must be 128 bytes (1024 bits) or 256 bytes (2048 bits) long.

ReadOnlySpan<byte> publicExponent

The public exponent as a canonical byte array. Note that the YubiKey supports only 0x01 0x00 0x01 (aka F4) as a public exponent.

Exceptions

Type Condition
ArgumentException

The key data supplied is not supported.

In this article
Back to top Generated by DocFX