digest.hash_crc32b

STRINGdigest.hash_crc32bSTRINGs

Available inall subroutines.

Returns a CRC-32b digest for the string s. CRC-32b is not a cryptographic hash and is typically used as a fast error-detecting code for detecting changes in raw data. This function is a different algorithm than hash_crc32 and is not likely to return the same results given the same input string.

This algorithm is known as PKZip CRC-32 (ITU V.42), or more commonly CRC-32.

Example

declare local var.crc32b STRING;
set var.crc32b = digest.hash_crc32b("123456789");
# var.crc32b is now "2639f4cb"

User contributed notes

BETA

Do you see an error in this page? Do you have an interesting use case, example or edge case people should know about? Share your knowledge and help people who are reading this page! (Comments are moderated; for support, please contact Fastly support)