Skip to main content

decrypt_chunk

Function decrypt_chunk 

Source
pub fn decrypt_chunk(
    method: CipherMethod,
    key: &[u8],
    nonce: &[u8],
    data: &[u8],
) -> Result<Vec<u8>, ShadowsocksError>
Expand description

Decrypt a chunk with AEAD (for streaming).

Input: encrypted(2-byte length + plaintext) Returns: plaintext