Namespace: hashing Stay organized with collections Save and categorize content based on your preferences.
rules. hashing
Globally available hashing functions. These functions are accessed using thehashing.
prefix.
Methods
crc32
crc32(bytes_or_string) returns rules.Bytes
Compute a hash using the CRC32 algorithm.
Parameter | |
---|---|
bytes_or_string | (non-nullrules.Bytes or non-nullrules.String) Bytes sequence (declared with b prefix), or string. For strings, the UTF-8 encoding is used. |
- Returns
non-nullrules.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-nullrules.Bytes or non-nullrules.String) Bytes sequence (declared with b prefix), or string. For strings, the UTF-8 encoding is used. |
- Returns
non-nullrules.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-nullrules.Bytes or non-nullrules.String) Bytes sequence (declared with b prefix), or string. For strings, the UTF-8 encoding is used. |
- Returns
non-nullrules.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-nullrules.Bytes or non-nullrules.String) Bytes sequence (declared with b prefix), or string. For strings, the UTF-8 encoding is used. |
- Returns
non-nullrules.Bytes
hash value as a Bytes sequence.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2019-12-03 UTC.