Skip to main content

verify_asset_hashed

Function verify_asset_hashed 

Source
pub fn verify_asset_hashed(
    manifest: &AssetManifest,
    ciphertext_hash: &Hash32,
    directory: &DeviceDirectory,
    authority: &dyn AlbumAuthority,
    local_chain_head: Option<Hash32>,
) -> VerifyOutcome
Expand description

verify_asset over the ciphertext’s SHA-256 rather than its bytes, for a caller that streams a ciphertext too large to hold. Step 5 compares ciphertext_hash with the manifest’s content address, so it vouches for the bytes only as far as the caller’s digest does: a caller that has not hashed them yet must hash what it then reads and refuse it unless the result equals this argument. Every other step is verify_asset’s, unchanged.