Crate safebrowsing_hash

Source
Expand description

Hash generation and prefix matching for Google Safe Browsing API

This crate provides the hash generation and prefix matching functionality used in the Safe Browsing API. The API works with SHA256 hashes of canonicalized URLs, typically using the first 4 bytes (32 bits) of the hash as a prefix for efficient lookups.

Modules§

rice
Rice-Golomb encoding and decoding for Safe Browsing

Structs§

HashPrefix
HashPrefixSet
A set of hash prefixes for efficient lookups
HashPrefixes
A collection of hash prefixes
HashSet
HashSet for fast hash prefix lookups

Enums§

HashError
Error type for hash operations

Constants§

MAX_HASH_PREFIX_LENGTH
The maximum allowed hash prefix length (32 bytes)
MIN_HASH_PREFIX_LENGTH
The minimum allowed hash prefix length (4 bytes)

Type Aliases§

Result
Result type for hash operations