Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

Namespace: hashing

rules.hashing

namespace   static

Globally available hashing functions. These functions are accessed using thehashing. prefix.

Methods

crc32

static

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

static

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

static

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

static

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.


[8]ページ先頭

©2009-2025 Movatter.jp