pub fn decrypt_payload(
header: &FixedHeader,
payload_key: &SecretKey,
ciphertext: &[u8],
index: Option<&[CompressionIndexEntry]>,
) -> Result<Vec<u8>>Expand description
解密整个载荷。
index 在压缩模式下必须提供(规范要求压缩文件必带 CRITICAL 索引 TLV)。
§Errors
Error::MissingTlv:压缩模式但未提供索引Error::ChunkAuthFailed:某块认证失败Error::Compression:解压失败Error::MalformedHeader:解密结果长度与plaintext_size不符