HashVerificationStrategy
Overview
The HashVerificationStrategy
verifies data integrity by comparing SHA-256 hashes of fetched data against trusted gateway digest headers. This strategy provides fast, cryptographically secure verification for high-throughput applications.
How It Works
- Fetch Data: Retrieve content from the selected gateway
- Request Digest: Get the digest from trusted gateways via HTTP headers using HEAD/GET requests from a trusted gatweay
- Compute Hash: Calculate the SHA-256 hash of the received data
- Compare: Verify that both hashes match exactly
- Result: Pass or fail based on hash comparison
Basic Usage
Related
- Signature Verification: Understand authenticity validation
- Data Root Verification: Explore maximum security verification