crc16
Written as crc16(argnum flags):options in a transform expression.
| Minimum arguments | 1 |
| Maximum arguments | 1 |
| Default arguments | 1 |
| Argument modes | SINGLE_PRIMITIVE |
Documentation
Section titled “Documentation”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 |
Examples
Section titled “Examples”Basic hashing
Section titled “Basic hashing”Input args: ["hello"]Transforms: "crc16:"Output: 50018With bytes input
Section titled “With bytes input”Input args: ["hello"]Transforms: "crc16:"Output: 50018With hex output
Section titled “With hex output”Input args: ["hello"]Transforms: "crc16(1H):"Output: "c362"