Show / Hide Table of Contents

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 Source

Value

Returns the data checksum computed so far.

Declaration
long Value { get; }
Property Value
Type Description
System.Int64

Methods

| Improve this Doc View Source

Reset()

Resets the data checksum as if no update was ever called.

Declaration
void Reset()
| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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.

  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2000-2022 SharpZipLib Contributors