rules. hashing
Globally available hashing functions. These functions are accessed
using the hashing.
prefix.
Methods
crc32
crc32(bytes_or_string) returns rules.Bytes
Compute a hash using the CRC32 algorithm.
Parameter |
|
---|---|
bytes_or_string |
(non-null rules.Bytes or non-null rules.String) Bytes sequence (declared with b prefix), or string. For strings, the UTF-8 encoding is used. |
- Returns
-
non-null rules.Bytes
hash value as a Bytes sequence.
crc32c
crc32c(bytes_or_string) returns rules.Bytes
Compute a hash using the CRC32C algorithm.
Parameter |
|
---|---|
bytes_or_string |
(non-null rules.Bytes or non-null rules.String) Bytes sequence (declared with b prefix), or string. For strings, the UTF-8 encoding is used. |
- Returns
-
non-null rules.Bytes
hash value as a Bytes sequence.
md5
md5(bytes_or_string) returns rules.Bytes
Compute a hash using the MD5 algorithm.
Parameter |
|
---|---|
bytes_or_string |
(non-null rules.Bytes or non-null rules.String) Bytes sequence (declared with b prefix), or string. For strings, the UTF-8 encoding is used. |
- Returns
-
non-null rules.Bytes
hash value as a Bytes sequence.
sha256
sha256(bytes_or_string) returns rules.Bytes
Compute a hash using the SHA-256 algorithm.
Parameter |
|
---|---|
bytes_or_string |
(non-null rules.Bytes or non-null rules.String) Bytes sequence (declared with b prefix), or string. For strings, the UTF-8 encoding is used. |
- Returns
-
non-null rules.Bytes
hash value as a Bytes sequence.