Table of Contents

Class RSAlgorithm

Namespace
JWT.Algorithms
Assembly
Coherence.JWT.dll

RSASSA-PKCS1-v1_5 using SHA-256

public abstract class RSAlgorithm : CertificateAlgorithm<RSA>, IAsymmetricAlgorithm, IJwtAlgorithm
Inheritance
RSAlgorithm
Implements
Derived
Inherited Members
Extension Methods

Constructors

RSAlgorithm(RSA)

Creates an instance of RSAlgorithm using the provided public key only.

protected RSAlgorithm(RSA publicKey)

Parameters

publicKey RSA

The public key for verifying the data.

Remarks

An instance created using this constructor can only be used for verifying the data, not for signing it.

RSAlgorithm(RSA, RSA)

Creates an instance of RSAlgorithm using the provided pair of public and private keys.

protected RSAlgorithm(RSA publicKey, RSA privateKey)

Parameters

publicKey RSA

The public key for verifying the data.

privateKey RSA

The private key for signing the data.

RSAlgorithm(X509Certificate2)

Creates an instance using the provided certificate.

protected RSAlgorithm(X509Certificate2 cert)

Parameters

cert X509Certificate2

The certificate having a public key and an optional private key.

Methods

GetPrivateKey(X509Certificate2)

protected override RSA GetPrivateKey(X509Certificate2 cert)

Parameters

cert X509Certificate2

Returns

RSA

GetPublicKey(X509Certificate2)

protected override RSA GetPublicKey(X509Certificate2 cert)

Parameters

cert X509Certificate2

Returns

RSA

SignData(byte[])

protected override byte[] SignData(byte[] bytesToSign)

Parameters

bytesToSign byte[]

Returns

byte[]

VerifyData(byte[], byte[])

protected override bool VerifyData(byte[] bytesToSign, byte[] signature)

Parameters

bytesToSign byte[]
signature byte[]

Returns

bool