Class: Google::Apis::WebriskV1::GoogleCloudWebriskV1RawHashes
- Inherits:
-
Object
- Object
- Google::Apis::WebriskV1::GoogleCloudWebriskV1RawHashes
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/webrisk_v1/classes.rb,
lib/google/apis/webrisk_v1/representations.rb,
lib/google/apis/webrisk_v1/representations.rb
Overview
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.
Instance Attribute Summary collapse
-
#prefix_size ⇒ Fixnum
The number of bytes for each prefix encoded below.
-
#raw_hashes ⇒ String
The hashes, in binary format, concatenated into one long string.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudWebriskV1RawHashes
constructor
A new instance of GoogleCloudWebriskV1RawHashes.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudWebriskV1RawHashes
Returns a new instance of GoogleCloudWebriskV1RawHashes.
125 126 127 |
# File 'lib/google/apis/webrisk_v1/classes.rb', line 125 def initialize(**args) update!(**args) end |
Instance Attribute Details
#prefix_size ⇒ Fixnum
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.
Corresponds to the JSON property prefixSize
116 117 118 |
# File 'lib/google/apis/webrisk_v1/classes.rb', line 116 def prefix_size @prefix_size end |
#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.
Corresponds to the JSON property rawHashes
NOTE: Values are automatically base64 encoded/decoded in the client library.
123 124 125 |
# File 'lib/google/apis/webrisk_v1/classes.rb', line 123 def raw_hashes @raw_hashes end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
130 131 132 133 |
# File 'lib/google/apis/webrisk_v1/classes.rb', line 130 def update!(**args) @prefix_size = args[:prefix_size] if args.key?(:prefix_size) @raw_hashes = args[:raw_hashes] if args.key?(:raw_hashes) end |