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
publicKeyRSAThe 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
publicKeyRSAThe public key for verifying the data.
privateKeyRSAThe private key for signing the data.
RSAlgorithm(X509Certificate2)
Creates an instance using the provided certificate.
protected RSAlgorithm(X509Certificate2 cert)
Parameters
certX509Certificate2The certificate having a public key and an optional private key.
Methods
GetPrivateKey(X509Certificate2)
protected override RSA GetPrivateKey(X509Certificate2 cert)
Parameters
certX509Certificate2
Returns
GetPublicKey(X509Certificate2)
protected override RSA GetPublicKey(X509Certificate2 cert)
Parameters
certX509Certificate2
Returns
SignData(byte[])
protected override byte[] SignData(byte[] bytesToSign)
Parameters
bytesToSignbyte[]
Returns
- byte[]
VerifyData(byte[], byte[])
protected override bool VerifyData(byte[] bytesToSign, byte[] signature)