Class SignedPackageArchive
A nupkg that supports both reading and writing signatures.
public class SignedPackageArchive : PackageArchiveReader, IPackageCoreReader, IPackageContentReader, IAsyncPackageCoreReader, IAsyncPackageContentReader, ISignedPackage, ISignedPackageReader, IDisposable, ISignedPackageWriter
- Inheritance
-
SignedPackageArchive
- Implements
- Inherited Members
- Extension Methods
Constructors
SignedPackageArchive(Stream, Stream)
public SignedPackageArchive(Stream packageReadStream, Stream packageWriteStream)
Parameters
Methods
AddSignatureAsync(Stream, CancellationToken)
Adds a signature to a package if it is not already signed.
public Task AddSignatureAsync(Stream signatureStream, CancellationToken token)
Parameters
signatureStream
StreamStream of the signature SignedCms object to be added to the package.
token
CancellationTokenCancellation Token.
Returns
Dispose(bool)
protected override void Dispose(bool disposing)
Parameters
disposing
bool
IsZip64Async(CancellationToken)
Check if a package is Zip64.
public Task<bool> IsZip64Async(CancellationToken token)
Parameters
token
CancellationTokenA 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)
Remove a signature from the package, if it exists.
public Task RemoveSignatureAsync(CancellationToken token)
Parameters
token
CancellationTokenCancellation token.