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.​SecurityKey
Assembly: Microsoft.IdentityModel.Tokens
Inheritance: object → SecurityKey
Base class for Security Key.
Properties
public
int
KeySize
This must be overridden to get the size of this <see cref="T:Microsoft.IdentityModel.Tokens.SecurityKey" /> .
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
string
ToString​()
Returns the formatted string: GetType(), KeyId: 'value', InternalId: 'value'.
Returns string
public
bool
CanComputeJwkThumbprint​()
Determines whether the <see cref="T:Microsoft.IdentityModel.Tokens.SecurityKey" /> 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.SecurityKey" /> .
Returns A JWK thumbprint.
Remarks
https://datatracker.ietf.org/doc/html/rfc7638
public
bool
IsSupportedAlgorithm​(string algorithm)
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