Class HashString
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
valuestringThe formatted hash string.
formatHashFormatThe format used to encode the hash.
Properties
Format
Gets the format used to encode this hash string.
public HashFormat Format { get; }
Property Value
Value
Gets the formatted hash string.
public string Value { get; }
Property Value
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
hashHashString