Reference documentation and code samples for the Google Cloud Web Risk V1 Client class RawHashes.
The uncompressed threat entries in hash format.
Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4
bytes, but some hashes are lengthened if they collide with the hash of a
popular URI.
Used for sending ThreatEntryAdditons to clients that do not support
compression, or when sending non-4-byte hashes to clients that do support
compression.
Generated from protobuf message google.cloud.webrisk.v1.RawHashes
Namespace
Google \ Cloud \ WebRisk \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ prefix_size
int
The number of bytes for each prefix encoded below. This field can be anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). In practice this is almost always 4, except in exceptional circumstances.
↳ raw_hashes
string
The hashes, in binary format, concatenated into one long string. Hashes are sorted in lexicographic order. For JSON API users, hashes are base64-encoded.
getPrefixSize
The number of bytes for each prefix encoded below. This field can be
anywhere from 4 (shortest prefix) to 32 (full SHA256 hash).
In practice this is almost always 4, except in exceptional circumstances.
Returns
Type
Description
int
setPrefixSize
The number of bytes for each prefix encoded below. This field can be
anywhere from 4 (shortest prefix) to 32 (full SHA256 hash).
In practice this is almost always 4, except in exceptional circumstances.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getRawHashes
The hashes, in binary format, concatenated into one long string. Hashes are
sorted in lexicographic order. For JSON API users, hashes are
base64-encoded.
Returns
Type
Description
string
setRawHashes
The hashes, in binary format, concatenated into one long string. Hashes are
sorted in lexicographic order. For JSON API users, hashes are
base64-encoded.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Web Risk V1 Client - Class RawHashes (2.1.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.1 (latest)](/php/docs/reference/cloud-web-risk/latest/V1.RawHashes)\n- [2.1.0](/php/docs/reference/cloud-web-risk/2.1.0/V1.RawHashes)\n- [2.0.3](/php/docs/reference/cloud-web-risk/2.0.3/V1.RawHashes)\n- [1.5.5](/php/docs/reference/cloud-web-risk/1.5.5/V1.RawHashes)\n- [1.4.4](/php/docs/reference/cloud-web-risk/1.4.4/V1.RawHashes)\n- [1.3.0](/php/docs/reference/cloud-web-risk/1.3.0/V1.RawHashes)\n- [1.2.7](/php/docs/reference/cloud-web-risk/1.2.7/V1.RawHashes) \nReference documentation and code samples for the Google Cloud Web Risk V1 Client class RawHashes.\n\nThe uncompressed threat entries in hash format.\n\nHashes can be anywhere from 4 to 32 bytes in size. A large majority are 4\nbytes, but some hashes are lengthened if they collide with the hash of a\npopular URI.\nUsed for sending ThreatEntryAdditons to clients that do not support\ncompression, or when sending non-4-byte hashes to clients that do support\ncompression.\n\nGenerated from protobuf message `google.cloud.webrisk.v1.RawHashes`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ WebRisk \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getPrefixSize\n\nThe number of bytes for each prefix encoded below. This field can be\nanywhere from 4 (shortest prefix) to 32 (full SHA256 hash).\n\nIn practice this is almost always 4, except in exceptional circumstances.\n\n### setPrefixSize\n\nThe number of bytes for each prefix encoded below. This field can be\nanywhere from 4 (shortest prefix) to 32 (full SHA256 hash).\n\nIn practice this is almost always 4, except in exceptional circumstances.\n\n### getRawHashes\n\nThe hashes, in binary format, concatenated into one long string. Hashes are\nsorted in lexicographic order. For JSON API users, hashes are\nbase64-encoded.\n\n### setRawHashes\n\nThe hashes, in binary format, concatenated into one long string. Hashes are\nsorted in lexicographic order. For JSON API users, hashes are\nbase64-encoded."]]