Skip to content

crc16

Written as crc16(argnum flags):options in a transform expression.

Minimum arguments 1
Maximum arguments 1
Default arguments 1
Argument modes SINGLE_PRIMITIVE

Generate CRC-16 hash from input string or bytes.

This transform computes the crc-16 hash of the input text and returns the hexadecimal digest string. The input can be any string or bytes-like object.

Notes:

  • Returns a 4-character hexadecimal string if ‘H’ flag is set, otherwise returns an integer
  • Input is encoded as UTF-8 if not already bytes
  • Not suitable for cryptographic purposes (use stronger hashes for security)
  • Consistent output for same input across different platforms
Flag Letter
noncaptive_input I
hex H
Input args: ["hello"]
Transforms: "crc16:"
Output: 50018
Input args: ["hello"]
Transforms: "crc16:"
Output: 50018
Input args: ["hello"]
Transforms: "crc16(1H):"
Output: "c362"