Certes
Show / Hide Table of Contents

Class AccountKey

Represents a JSON Web Signature (JWS) key pair.

Inheritance
object
AccountKey
Implements
IAccountKey
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Certes.Jws
Assembly: Certes.dll
Syntax
public class AccountKey : IAccountKey

Constructors

| Edit this page View Source

AccountKey(KeyAlgorithm)

Initializes a new instance of the AccountKey class.

Declaration
public AccountKey(KeyAlgorithm algorithm = KeyAlgorithm.ES256)
Parameters
Type Name Description
KeyAlgorithm algorithm

The JWS signature algorithm.

| Edit this page View Source

AccountKey(KeyInfo)

Initializes a new instance of the AccountKey class.

Declaration
public AccountKey(KeyInfo keyInfo)
Parameters
Type Name Description
KeyInfo keyInfo

The key information.

Exceptions
Type Condition
ArgumentNullException

keyInfo

NotSupportedException

If the provided key is not one of the supported KeyAlgorithm.

Properties

| Edit this page View Source

Algorithm

Gets the signing algorithm.

Declaration
public KeyAlgorithm Algorithm { get; }
Property Value
Type Description
KeyAlgorithm

The signing algorithm.

| Edit this page View Source

JsonWebKey

Gets the JSON web key.

Declaration
public JsonWebKey JsonWebKey { get; }
Property Value
Type Description
JsonWebKey

The JSON web key.

| Edit this page View Source

SignatureKey

Gets the signature key.

Declaration
public IKey SignatureKey { get; }
Property Value
Type Description
IKey

The signature key.

Methods

| Edit this page View Source

ComputeHash(byte[])

Computes the hash for given data.

Declaration
public byte[] ComputeHash(byte[] data)
Parameters
Type Name Description
byte[] data

The data.

Returns
Type Description
byte[]

The hash.

| Edit this page View Source

Export()

Exports the key pair.

Declaration
public KeyInfo Export()
Returns
Type Description
KeyInfo

The key pair.

| Edit this page View Source

SignData(byte[])

Signs the data.

Declaration
public byte[] SignData(byte[] data)
Parameters
Type Name Description
byte[] data

The data.

Returns
Type Description
byte[]

The signature.

Implements

IAccountKey

Extension Methods

AccountKeyExtensions.GenerateThumbprint(IAccountKey)
AccountKeyExtensions.KeyAuthorization(IAccountKey, string)
AccountKeyExtensions.Thumbprint(IAccountKey)

See Also

IAccountKey
  • Edit this page
  • View Source
© 2018 Certes Project
Back to top