Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

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.

void cksumReset()

cksumUpdate

Updates the cksum using the specified array of bytes.

void cksumUpdate( bytearray data )
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).

long cksumResult()

cksumLength

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

long cksumLength()

cksum Example
 

Example - cksum

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

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.

long crc32( any  source  )
ParameterDescription

source

The argument used to compute the CRC-32. Supported types are string, bytearray and number types.

Returns

The CRC-32 value


  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.