encode_cookie_advanced

Function encode_cookie_advanced 

Source
pub fn encode_cookie_advanced<'a>(
    key: SigningKey,
    nonce: Nonce,
    name: impl AsRef<[u8]>,
    value: impl AsRef<[u8]>,
    output: &'a mut [u8],
) -> Result<(), OutputBufferWrongSize>
Expand description

Just like encode_cookie, but advanced.

This function supports running in a no_std environment without the rand crate. To securely produce cookies you must guarantee that the provided Nonce is filled with cryptographically secure random data and the signing key you provide abides by the requirements documented on the SigningKey type.

You can use the encoded_buffer_size function to get the required size of the output buffer.