Class ChdHashResult

Namespace
CHDSharp.Models
Assembly
CHDSharpLib.dll

Hashes of one contiguous region of a CHD's decompressed content.

public sealed record ChdHashResult : IEquatable<ChdHashResult>
Inheritance
ChdHashResult
Implements
Inherited Members

Constructors

ChdHashResult(int?, ulong, long, byte[]?, byte[]?, uint?, ulong?)

Hashes of one contiguous region of a CHD's decompressed content.

public ChdHashResult(int? TrackNumber, ulong StartOffset, long Length, byte[]? Sha1, byte[]? Sha256, uint? Crc32, ulong? Xxh3)

Parameters

TrackNumber int?

The 1-based CD track number for per-track hashing, or null for the whole image.

StartOffset ulong

Byte offset of the region within the decompressed image.

Length long

Length of the region in bytes.

Sha1 byte[]

SHA-1 of the region, or null if not requested.

Sha256 byte[]

SHA-256 of the region, or null if not requested.

Crc32 uint?

CRC-32 of the region, or null if not requested.

Xxh3 ulong?

XXH3-64 of the region, or null if not requested.

Properties

Crc32

CRC-32 of the region, or null if not requested.

public uint? Crc32 { get; init; }

Property Value

uint?

Length

Length of the region in bytes.

public long Length { get; init; }

Property Value

long

Sha1

SHA-1 of the region, or null if not requested.

public byte[]? Sha1 { get; init; }

Property Value

byte[]

Sha256

SHA-256 of the region, or null if not requested.

public byte[]? Sha256 { get; init; }

Property Value

byte[]

StartOffset

Byte offset of the region within the decompressed image.

public ulong StartOffset { get; init; }

Property Value

ulong

TrackNumber

The 1-based CD track number for per-track hashing, or null for the whole image.

public int? TrackNumber { get; init; }

Property Value

int?

Xxh3

XXH3-64 of the region, or null if not requested.

public ulong? Xxh3 { get; init; }

Property Value

ulong?

Methods

ToHex(ChdHashType)

Formats a hex string for one of the hashes, or null when unavailable.

public string? ToHex(ChdHashType type)

Parameters

type ChdHashType

Returns

string