Table of Contents

Class HashResult

Namespace
Cuemon.Security
Assembly
Cuemon.Core.dll

Represents the result of a computed checksum operation.

public class HashResult : IEquatable<HashResult>
Inheritance
HashResult
Implements

Constructors

HashResult(Byte[])

Initializes a new instance of the HashResult class.

public HashResult(byte[] input)

Parameters

input Byte[]

The computed checksum represented as a byte[].

Properties

HasValue

Gets a value indicating whether this instance has a checksum representation that consist of at least one byte.

public bool HasValue { get; }

Property Value

Boolean

true if this instance has a checksum representation that consist of at least one byte; otherwise, false.

Methods

Equals(HashResult)

Indicates whether the current object is equal to another object of the same type.

public virtual bool Equals(HashResult other)

Parameters

other HashResult

An object to compare with this object.

Returns

Boolean

true if the current object is equal to the other parameter; otherwise, false.

Equals(Object)

Determines whether the specified Object is equal to this instance.

public override bool Equals(object obj)

Parameters

obj Object

The Object to compare with the current Object.

Returns

Boolean

true if the specified Object is equal to this instance; otherwise, false.

GetBytes()

Creates a copy of the original value that reflects a computed operation.

public byte[] GetBytes()

Returns

Byte[]

The copy of the original value that reflects a computed operation.

GetHashCode()

Returns a hash code for this instance.

public override int GetHashCode()

Returns

Int32

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

To<T>(Func<Byte[], T>)

Provides a generic converter of a byte[].

public T To<T>(Func<byte[], T> converter)

Parameters

converter Func<Byte[], T>

The function delegate that takes the underlying value of this instance and converts it into T.

Returns

T

An instance or value of T.

Type Parameters

T

The type of the result.

ToBase64String()

Converts the underlying value of this instance to its equivalent string representation that is encoded with base-64 digits.

public virtual string ToBase64String()

Returns

String

A String representation, in base 64, of the contents of the underlying value of this instance.

ToBinaryString()

Converts the underlying value of this instance to its equivalent binary representation.

public virtual string ToBinaryString()

Returns

String

A String representation, in binary, of the contents of the underlying value of this instance.

ToHexadecimalString()

Converts the underlying value of this instance to its equivalent hexadecimal representation.

public virtual string ToHexadecimalString()

Returns

String

A String representation, in hexadecimal, of the contents of the underlying value of this instance.

ToString()

Returns a String that represents this instance.

public override string ToString()

Returns

String

A String that represents this instance.

ToUrlEncodedBase64String()

Converts the underlying value of this instance to its equivalent string representation that is encoded with base-64 digits, which is usable for transmission on the URL.

public virtual string ToUrlEncodedBase64String()

Returns

String

A String representation, in base 64 which is usable for transmission on the URL, of the contents of the underlying value of this instance.