Skip to main content

Module proof

Module proof 

Source

Functionsยง

build_proof_data
Build proof data: [resource_hash: 32 bytes][proof: 32 bytes].
compute_expected_proof
Compute expected proof: SHA-256(unencrypted_data + resource_hash). unencrypted_data is the same data used in compute_resource_hash.
compute_resource_hash
Compute resource hash: SHA-256(unencrypted_data + random_hash). unencrypted_data is the metadata-prefixed data BEFORE encryption. Returns full 32-byte hash.
validate_proof
Validate proof data against expected proof. proof_data = [resource_hash: 32 bytes][proof: 32 bytes]