X509SecurityKey Class

Definition

An AsymmetricSecurityKey that is backed by a X509Certificate2

public class X509SecurityKey : Microsoft.IdentityModel.Tokens.AsymmetricSecurityKey
type X509SecurityKey = class
    inherit AsymmetricSecurityKey
Public Class X509SecurityKey
Inherits AsymmetricSecurityKey
Inheritance

Constructors

X509SecurityKey(X509Certificate2)

Instantiates a X509SecurityKey using a X509Certificate2

X509SecurityKey(X509Certificate2, String)

Instantiates a X509SecurityKey using a X509Certificate2.

Properties

Certificate

Gets the X509Certificate2.

CryptoProviderFactory

Gets or sets CryptoProviderFactory.

(Inherited from SecurityKey)
HasPrivateKey
Obsolete.

Gets a bool indicating if a private key exists.

KeyId

Gets the key id of this SecurityKey.

(Inherited from SecurityKey)
KeySize

Gets the key size.

PrivateKey

Returns the private key from the X509SecurityKey.

PrivateKeyStatus

Gets an enum indicating if a private key exists.

PublicKey

Gets the public key from the X509SecurityKey.

X5t

Gets the X5t of this X509SecurityKey.

Methods

CanComputeJwkThumbprint()

Determines whether the X509SecurityKey can compute a JWK thumbprint.

ComputeJwkThumbprint()

Computes a sha256 hash over the X509SecurityKey.

Equals(Object)

Returns a bool indicating if this key is equivalent to another key.

GetHashCode()

Returns an int hash code.

IsSupportedAlgorithm(String)

Checks if CryptoProviderFactory can perform the cryptographic operation specified by the algorithm with this SecurityKey.

(Inherited from SecurityKey)
ToString()

Returns the formatted string: GetType(), KeyId: 'value', InternalId: 'value'.

(Inherited from SecurityKey)

Applies to