Table of Contents

Class HashString

Namespace
Tharga.Toolkit
Assembly
Tharga.Toolkit.dll

Represents a hash value formatted as a string (e.g. hex, Base64, Base32). Inherits from Hash and retains the raw bytes alongside the formatted string.

public record HashString : Hash, IEquatable<Hash>, IEquatable<HashString>
Inheritance
HashString
Implements
Inherited Members
Extension Methods

Constructors

HashString(string, HashFormat)

Creates a new HashString from a formatted string and its format type.

public HashString(string value, HashFormat format)

Parameters

value string

The formatted hash string.

format HashFormat

The format used to encode the hash.

Properties

Format

Gets the format used to encode this hash string.

public HashFormat Format { get; }

Property Value

HashFormat

Value

Gets the formatted hash string.

public string Value { get; }

Property Value

string

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

implicit operator string(HashString)

Converts a HashString to its string representation.

public static implicit operator string(HashString hash)

Parameters

hash HashString

Returns

string