Class ChecksumBuilder
Provides a way to fluently represent checksum values of arbitrary data.
Namespace: Cuemon.Integrity
Assembly: Cuemon.Integrity.dll
Syntax
public class ChecksumBuilder
Constructors
| Improve this DocChecksumBuilder()
Initializes a new instance of the ChecksumBuilder class.
Declaration
public ChecksumBuilder()
ChecksumBuilder(Byte[], Action<ChecksumBuilderOptions>)
Initializes a new instance of the ChecksumBuilder class.
Declaration
public ChecksumBuilder(byte[] checksum, Action<ChecksumBuilderOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | checksum | An array of bytes containing a checksum of the data this instance represents. |
System.Action<ChecksumBuilderOptions> | setup | The ChecksumBuilderOptions which need to be configured. |
ChecksumBuilder(Double, Action<ChecksumBuilderOptions>)
Initializes a new instance of the ChecksumBuilder class.
Declaration
public ChecksumBuilder(double checksum, Action<ChecksumBuilderOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Double | checksum | A System.Double value containing a byte-for-byte checksum of the data this instance represents. |
System.Action<ChecksumBuilderOptions> | setup | The ChecksumBuilderOptions which need to be configured. |
ChecksumBuilder(Int16, Action<ChecksumBuilderOptions>)
Initializes a new instance of the ChecksumBuilder class.
Declaration
public ChecksumBuilder(short checksum, Action<ChecksumBuilderOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int16 | checksum | A System.Int16 value containing a byte-for-byte checksum of the data this instance represents. |
System.Action<ChecksumBuilderOptions> | setup | The ChecksumBuilderOptions which need to be configured. |
ChecksumBuilder(Int32, Action<ChecksumBuilderOptions>)
Initializes a new instance of the ChecksumBuilder class.
Declaration
public ChecksumBuilder(int checksum, Action<ChecksumBuilderOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | checksum | A System.Int32 value containing a byte-for-byte checksum of the data this instance represents. |
System.Action<ChecksumBuilderOptions> | setup | The ChecksumBuilderOptions which need to be configured. |
ChecksumBuilder(Int64, Action<ChecksumBuilderOptions>)
Initializes a new instance of the ChecksumBuilder class.
Declaration
public ChecksumBuilder(long checksum, Action<ChecksumBuilderOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | checksum | A System.Int64 value containing a byte-for-byte checksum of the data this instance represents. |
System.Action<ChecksumBuilderOptions> | setup | The ChecksumBuilderOptions which need to be configured. |
ChecksumBuilder(Single, Action<ChecksumBuilderOptions>)
Initializes a new instance of the ChecksumBuilder class.
Declaration
public ChecksumBuilder(float checksum, Action<ChecksumBuilderOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Single | checksum | A System.Single value containing a byte-for-byte checksum of the data this instance represents. |
System.Action<ChecksumBuilderOptions> | setup | The ChecksumBuilderOptions which need to be configured. |
ChecksumBuilder(String, Action<ChecksumBuilderOptions>)
Initializes a new instance of the ChecksumBuilder class.
Declaration
public ChecksumBuilder(string checksum, Action<ChecksumBuilderOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | checksum | A System.String value containing a byte-for-byte checksum of the data this instance represents. |
System.Action<ChecksumBuilderOptions> | setup | The ChecksumBuilderOptions which need to be configured. |
ChecksumBuilder(UInt16, Action<ChecksumBuilderOptions>)
Initializes a new instance of the ChecksumBuilder class.
Declaration
public ChecksumBuilder(ushort checksum, Action<ChecksumBuilderOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.UInt16 | checksum | A System.UInt16 value containing a byte-for-byte checksum of the data this instance represents. |
System.Action<ChecksumBuilderOptions> | setup | The ChecksumBuilderOptions which need to be configured. |
ChecksumBuilder(UInt32, Action<ChecksumBuilderOptions>)
Initializes a new instance of the ChecksumBuilder class.
Declaration
public ChecksumBuilder(uint checksum, Action<ChecksumBuilderOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | checksum | A System.UInt32 value containing a byte-for-byte checksum of the data this instance represents. |
System.Action<ChecksumBuilderOptions> | setup | The ChecksumBuilderOptions which need to be configured. |
ChecksumBuilder(UInt64, Action<ChecksumBuilderOptions>)
Initializes a new instance of the ChecksumBuilder class.
Declaration
public ChecksumBuilder(ulong checksum, Action<ChecksumBuilderOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.UInt64 | checksum | A System.UInt64 value containing a byte-for-byte checksum of the data this instance represents. |
System.Action<ChecksumBuilderOptions> | setup | The ChecksumBuilderOptions which need to be configured. |
Properties
| Improve this DocAlgorithmType
Gets the hash algorithm to use for the checksum computation.
Declaration
public HashAlgorithmType AlgorithmType { get; protected set; }
Property Value
Type | Description |
---|---|
HashAlgorithmType | The hash algorithm to use for the checksum computation. |
Checksum
Gets a ChecksumResult containing a computed hash value of the data this instance represents.
Declaration
public ChecksumResult Checksum { get; }
Property Value
Type | Description |
---|---|
ChecksumResult | A ChecksumResult containing a computed hash value of the data this instance represents. |
Methods
| Improve this DocEquals(ChecksumBuilder)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(ChecksumBuilder other)
Parameters
Type | Name | Description |
---|---|---|
ChecksumBuilder | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Equals(Object)
Determines whether the specified System.Object is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The System.Object to compare with the current System.Object. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Overrides
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
ToString()
Converts the the Cuemon.Integrity.ChecksumBuilder.Bytes of this instance to its equivalent hexadecimal representation.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A hexadecimal representation of this instance. |