Interface IChecksum
Interface to compute a data checksum used by checked input/output streams. A data checksum can be updated by one byte or with a byte array. After each update the value of the current checksum can be returned by calling
getValue
. The complete checksum object can also be reset
so it can be used again with new data.
Namespace: ICSharpCode.SharpZipLib.Checksum
Assembly: ICSharpCode.SharpZipLib.dll
Syntax
public interface IChecksum
Properties
| Improve this Doc View SourceValue
Returns the data checksum computed so far.
Declaration
long Value { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
Methods
| Improve this Doc View SourceReset()
Resets the data checksum as if no update was ever called.
Declaration
void Reset()
Update(ArraySegment<Byte>)
Adds the byte array to the data checksum.
Declaration
void Update(ArraySegment<byte> segment)
Parameters
Type | Name | Description |
---|---|---|
System.ArraySegment<System.Byte> | segment | The chunk of data to add |
Update(Byte[])
Updates the data checksum with the bytes taken from the array.
Declaration
void Update(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | buffer an array of bytes |
Update(Int32)
Adds one byte to the data checksum.
Declaration
void Update(int bval)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | bval | the data value to add. The high byte of the int is ignored. |