utils/crc32
module
Type Definitions
Functions
crc32( inputData ) → stringmodule:utils/crc32~crc32Calculates CRC-32 checksum for a given inputData to verify the integrity of data.
Parameters
inputData : CRCDataAccepts a single value (string, number, boolean), an array of strings, or an array of all of the above types. Non-string values are converted to strings before calculating the checksum. The checksum calculation is based on the concatenated string representation of the input values:
crc32('foo')is equivalent tocrc32(['foo'])crc32(123)is equivalent tocrc32(['123'])crc32(true)is equivalent tocrc32(['true'])crc32(['foo', 123, true])produces the same result ascrc32('foo123true')- Nested arrays of strings are flattened, so
crc32([['foo', 'bar'], 'baz'])is equivalent tocrc32(['foobar', 'baz'])
Returns
stringThe CRC-32 checksum, returned as a hexadecimal string.