PivRsaPrivateKey Constructor
PivRsaPrivateKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)
Create a new instance of an RSA private key object based on the given CRT components.
C#
public PivRsaPrivateKey(ReadOnlySpan<byte> primeP, ReadOnlySpan<byte> primeQ, ReadOnlySpan<byte> exponentP, ReadOnlySpan<byte> exponentQ, ReadOnlySpan<byte> coefficient)
Parameters
Type | Name | Description |
---|---|---|
System.ReadOnlySpan<System.Byte> | primeP | The prime p as a canonical byte array. It must be 64 bytes (512 bits) or 128 bytes (1024 bits) long. |
System.ReadOnlySpan<System.Byte> | primeQ | The prime q as a canonical byte array. It must be 64 bytes (512 bits) or 128 bytes (1024 bits) long. |
System.ReadOnlySpan<System.Byte> | exponentP | The exponent p as a canonical byte array. It must be 64 bytes (512 bits) or 128 bytes (1024 bits) long. |
System.ReadOnlySpan<System.Byte> | exponentQ | The exponent q as a canonical byte array. It must be 64 bytes (512 bits) or 128 bytes (1024 bits) long. |
System.ReadOnlySpan<System.Byte> | coefficient | The CRT coefficient as a canonical byte array. It must be 64 bytes (512 bits) or 128 bytes (1024 bits) long. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | The key data supplied is not a supported length. |