Skip to main content

decrypt_shard_data

Function decrypt_shard_data 

Source
pub fn decrypt_shard_data(
    content_key: &ContentKey,
    ancestor_keys: &[ContentKey],
    blob: &EncryptedShard,
    wrapped_key: Option<&WrappedKey>,
) -> Result<DecryptedShard>
Expand description

Decrypt a shard blob with wrapped key support.

Fallback chain:

  1. If wrapped_key is Some, try unwrapping with content_key, then each ancestor key
  2. Try content_key directly
  3. Try each ancestor key directly