Skip to main content

decrypt_chunk

Function decrypt_chunk 

Source
pub fn decrypt_chunk(
    payload_key: &SecretKey,
    cipher: CipherId,
    base_nonce: &[u8; 7],
    file_uuid: &[u8; 16],
    index: u32,
    is_final: bool,
    ciphertext: &[u8],
) -> Result<Vec<u8>>
Expand description

解密单个密文块。

§Errors

Error::ChunkAuthFailed:认证失败。可能原因是数据损坏、被篡改、 块序号错误,或文件被截断(is_final 不匹配)。