Struct CRC32
Implements CRC32 checksum algorithm
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Azos.IO.ErrorHandling
Assembly: Azos.dll
Syntax
public struct CRC32
Properties
Value
Returns present checksum for the pushed data
Declaration
public uint Value { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Methods
Add(Byte[])
Adds byte array into checksum
Declaration
public void Add(byte[] buff)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buff |
Add(Byte[], Int32, Int32)
Adds byte array into checksum
Declaration
public void Add(byte[] buff, int idx, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buff | |
System.Int32 | idx | |
System.Int32 | length |
Add(Int32)
Adds integer value into checksum
Declaration
public void Add(int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value |
ForBytes(Byte[])
Computes CRC32 for byte array
Declaration
public static uint ForBytes(byte[] buff)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buff |
Returns
Type | Description |
---|---|
System.UInt32 |
ForEncodedString(String, Encoding)
Computes CRC32 for string
Declaration
public static uint ForEncodedString(string text, Encoding encoding)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | |
System.Text.Encoding | encoding |
Returns
Type | Description |
---|---|
System.UInt32 |
ForString(String)
Computes CRC32 for binary string representation (in-memory)
Declaration
public static uint ForString(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text |
Returns
Type | Description |
---|---|
System.UInt32 |