Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class Microsoft.​IdentityModel.​Tokens.​RsaSecurityKey
Assembly: Microsoft.IdentityModel.Tokens
Inheritance: object → SecurityKey → AsymmetricSecurityKey → RsaSecurityKey
Represents a Rsa security key.
Properties
public
bool
HasPrivateKey
Gets a bool indicating if a private key exists.
public
PrivateKeyStatus
PrivateKeyStatus
Gets an enum indicating if a private key exists.
public
int
KeySize
Gets RSA key size.
Parameters
<see cref="T:System.Security.Cryptography.RSAParameters" /> used to initialize the key.
<see cref="T:System.Security.Cryptography.RSA" /> instance used to initialize the key.
public
string
KeyId
Gets the key id of this <see cref="T:Microsoft.IdentityModel.Tokens.SecurityKey" /> .
public
CryptoProviderFactory
CryptoProviderFactory
Gets or sets <see cref="T:Microsoft.IdentityModel.Tokens.CryptoProviderFactory" /> .
Methods
public
bool
CanComputeJwkThumbprint​()
Determines whether the <see cref="T:Microsoft.IdentityModel.Tokens.RsaSecurityKey" /> can compute a JWK thumbprint.
Returns <c>true</c> if JWK thumbprint can be computed; otherwise, <c>false</c> .
Remarks
https://datatracker.ietf.org/doc/html/rfc7638
public
byte[]
ComputeJwkThumbprint​()
Computes a sha256 hash over the <see cref="T:Microsoft.IdentityModel.Tokens.RsaSecurityKey" /> .
Returns A JWK thumbprint.
Remarks
https://datatracker.ietf.org/doc/html/rfc7638
public
string
ToString​()
Inherited from SecurityKey
Returns the formatted string: GetType(), KeyId: 'value', InternalId: 'value'.
Returns string
public
bool
IsSupportedAlgorithm​(string algorithm)
Inherited from SecurityKey
Checks if <see cref="P:Microsoft.IdentityModel.Tokens.SecurityKey.CryptoProviderFactory" /> can perform the cryptographic operation specified by the <paramref name="algorithm" /> with this <see cref="T:Microsoft.IdentityModel.Tokens.SecurityKey" /> .
Returns true if <see cref="P:Microsoft.IdentityModel.Tokens.SecurityKey.CryptoProviderFactory" /> can perform the cryptographic operation sepecified by the <paramref name="algorithm" /> with this <see cref="T:Microsoft.IdentityModel.Tokens.SecurityKey" /> .
algorithm
the algorithm to be used.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object