Skip to main content

extract_integrity_proof

Function extract_integrity_proof 

Source
pub fn extract_integrity_proof(
    document: &Value,
    now: i64,
) -> Option<(Map<String, Value>, Cryptosuite, String)>
Expand description

Find a usable assertion-method integrity proof on document, if present, and not expired at now, in seconds since the Unix epoch.

Returns the proof object, its cryptosuite, and its verificationMethod id. The caller resolves that id to a key of the matching type and passes both back to verify_object_integrity_proof. proof may be a single object or an array (only the first usable one is returned; integrity_proofs has them all).