pub fn encode_runtime_frame(
key: &[u8; 32],
direction: RuntimeFrameDirection,
nonce: &[u8; 24],
payload: &[u8],
) -> Result<Vec<u8>, RuntimeFrameError>Expand description
Encode version/length, random nonce, ciphertext and its complete tag. Nonce MUST be fresh cryptographic randomness for every call under this key.