Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Use the functions described below to generates a checksum for a supplied argument.

cksumReset

Resets the cksum info and prepare to start new cksum calculation.

Code Block
void cksumReset()

cksumUpdate

Updates the cksum using the specified array of bytes.

...

ParameterDescription

bytearray

Any bytearray

ReturnsNothing

cksumResult

Gets the result of cksum (using all data that has been entered into cksumUpdate). Returns an unsigned 32 bit integer (as a long).

Code Block
long cksumResult()

cksumLength

Gets the total length of all data that has been entered into cksumUpdate.

Code Block
long cksumLength()

cksum Example
 

Info
titleExample - cksum

Simple APL code (Disk_1 is the input agent in the workflow)

Code Block
beginBatch {
 cksumReset();
}
consume {
 cksumUpdate( input );
}
endBatch {
 debug( ((string)cksumResult()) + " " + cksumLength() + " " +
 ((string)mimGet("Disk_1","Source Filename")) );
}


crc32

Function that computes the CRC-32 of supplied argument.

...