Table of Contents

Interface ISignedPackageWriter

Namespace
NuGet.Packaging.Signing
Assembly
Chocolatey.NuGet.Packaging.dll

A writer that only allows editing for the package signature.

public interface ISignedPackageWriter

Methods

AddSignatureAsync(Stream, CancellationToken)

Adds a signature in the package. Throws exception if the package is already signed.

Task AddSignatureAsync(Stream signatureStream, CancellationToken token)

Parameters

signatureStream Stream
token CancellationToken

Cancellation token.

Returns

Task

IsZip64Async(CancellationToken)

Check if a package is Zip64.

Task<bool> IsZip64Async(CancellationToken token)

Parameters

token CancellationToken

A cancellation token.

Returns

Task<bool>

A task that represents the asynchronous operation. The task result (Result) returns a bool indicating whether the package is signed.

Exceptions

OperationCanceledException

Thrown if token is cancelled.

RemoveSignatureAsync(CancellationToken)

Removes a signature if it exists.

Task RemoveSignatureAsync(CancellationToken token)

Parameters

token CancellationToken

CancellationToken

Returns

Task