pub trait HandshakeTokenKey: Send + Sync {
// Required methods
fn seal(
&self,
token_nonce: u128,
data: &mut Vec<u8>,
) -> Result<(), CryptoError>;
fn open<'a>(
&self,
token_nonce: u128,
data: &'a mut [u8],
) -> Result<&'a [u8], CryptoError>;
}Expand description
The trait for encrypting tokens that power retry packets and NEW_TOKEN frames.