Table of Contents

Class Sha512HashFunction

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

A SHA-512 hash function that supports incremental hashing.

This is non-private only to facilitate unit testing.

public sealed class Sha512HashFunction : IHashFunction, IDisposable
Inheritance
Sha512HashFunction
Implements
Inherited Members

Constructors

Sha512HashFunction()

public Sha512HashFunction()

Methods

Dispose()

public void Dispose()

GetHash()

Gets the hash.

Once GetHash is called, no further hash updates are allowed.

public string GetHash()

Returns

string

A base64-encoded hash.

GetHashBytes()

public byte[] GetHashBytes()

Returns

byte[]

Update(byte[], int, int)

Incrementally updates the hash.

public void Update(byte[] data, int offset, int count)

Parameters

data byte[]

The data to be included in the hash.

offset int

The offset from which data should be read.

count int

The count of bytes to read.