Table of Contents

Class LocalDevelopmentSigningService

Namespace
AsiBackbone.Signing.LocalDevelopment
Assembly
AsiBackbone.Signing.LocalDevelopment.dll

Provides local-development RSA signing and verification for AsiBackbone signing abstractions.

public sealed class LocalDevelopmentSigningService : IGovernanceSigningService, IGovernanceSignatureVerificationService, IDisposable
Inheritance
LocalDevelopmentSigningService
Implements
Inherited Members

Remarks

This service generates an in-process RSA key for samples and tests. It is not a production managed-key provider.

Constructors

LocalDevelopmentSigningService()

Initializes a new instance of the LocalDevelopmentSigningService class with default local-development options.

public LocalDevelopmentSigningService()

LocalDevelopmentSigningService(LocalDevelopmentSigningOptions)

Initializes a new instance of the LocalDevelopmentSigningService class.

public LocalDevelopmentSigningService(LocalDevelopmentSigningOptions options)

Parameters

options LocalDevelopmentSigningOptions

Exceptions

InvalidOperationException

Thrown when the configured RSA key size is below the supported minimum or is not supported by the platform RSA provider.

LocalDevelopmentSigningService(LocalDevelopmentSigningOptions, TimeProvider)

Initializes a new instance of the LocalDevelopmentSigningService class with an explicit clock.

public LocalDevelopmentSigningService(LocalDevelopmentSigningOptions options, TimeProvider timeProvider)

Parameters

options LocalDevelopmentSigningOptions

The local-development signing options. A snapshot is taken, so later changes to this instance have no effect.

timeProvider TimeProvider

The clock used to record the signing time in signing metadata.

Exceptions

InvalidOperationException

Thrown when the configured RSA key size is below the supported minimum or is not supported by the platform RSA provider.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

SignAsync(SigningRequest, CancellationToken)

Signs the supplied signing request and returns provider-neutral signing metadata.

public ValueTask<SigningResult> SignAsync(SigningRequest request, CancellationToken cancellationToken = default)

Parameters

request SigningRequest

The signing request.

cancellationToken CancellationToken

A token used to observe cancellation.

Returns

ValueTask<SigningResult>

The signing result.

VerifyAsync(SignatureVerificationRequest, CancellationToken)

Verifies the supplied signature verification request.

public ValueTask<SignatureVerificationResult> VerifyAsync(SignatureVerificationRequest request, CancellationToken cancellationToken = default)

Parameters

request SignatureVerificationRequest

The verification request.

cancellationToken CancellationToken

A token used to observe cancellation.

Returns

ValueTask<SignatureVerificationResult>

The verification result.