Table of Contents

Class ImageVerifier

Namespace
Pamoja.Update
Assembly
Pamoja.Update.dll

Hashes an image as it arrives and settles it against its manifest.

public sealed class ImageVerifier : IDisposable
Inheritance
ImageVerifier
Implements
Inherited Members

Constructors

ImageVerifier(Manifest)

Creates a verifier for the image a manifest describes.

public ImageVerifier(Manifest manifest)

Parameters

manifest Manifest

The manifest describing the image.

Exceptions

PamojaException

The native verifier could not be created.

Methods

Dispose()

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

public void Dispose()

Finish()

Settles the image against its manifest, spending this verifier.

public byte[] Finish()

Returns

byte[]

The digest of the image that was hashed.

Exceptions

PamojaException

The image is not the one the manifest described, or the verifier has already been settled.

Update(ReadOnlySpan<byte>)

Takes the next piece of the image, in order.

public void Update(ReadOnlySpan<byte> chunk)

Parameters

chunk ReadOnlySpan<byte>

The next bytes of the image.

Exceptions

PamojaException

More bytes have arrived than the manifest declared, or the verifier has already been settled.