encode_retry_token_with_rng

Function encode_retry_token_with_rng 

Source
pub fn encode_retry_token_with_rng<R: RngCore>(
    key: &TokenKey,
    peer_id: &PeerId,
    cid: &ConnectionId,
    rng: &mut R,
) -> Vec<u8> 
Expand description

Encode a retry token containing peer ID, connection ID, and a fresh nonce. Encrypts the token contents using AES-256-GCM with the provided key. Returns the encrypted token as bytes, including authentication tag and nonce.