Skip to main content

wrap_payload_symmetric

Function wrap_payload_symmetric 

Source
pub fn wrap_payload_symmetric(
    data: &[u8],
    aead_type: AeadType,
    symmetric_key: &[u8],
    nonce: &[u8],
) -> Result<Vec<u8>, WrapPayloadError>
Expand description

Wrap a payload with symmetric AEAD encryption (caller-supplied key + nonce).

Domain separation is handled by construction: callers MUST scope the symmetric key to a single use-case.