pub fn is_valid_retry(&self, odcid: &ConnectionId) -> bool {
        if self.packet_type != PacketType::Retry {
            return false;
        }
        let version = self.version.unwrap();
        let expansion = retry::expansion(version);
        if self.data.len() <= expansion {
            return false;
        }
        let (header, tag) = self.data.split_at(self.data.len() - expansion);
        let mut encoder = Encoder::with_capacity(self.data.len());
        encoder.encode_vec(1, odcid);
        encoder.encode(header);
        retry::use_aead(version, |aead| {
            let mut buf = vec![0; expansion];
            Ok(aead.decrypt(0, &encoder, tag, &mut buf)?.is_empty())
        })
        .unwrap_or(false)
    }
/// Validate the given packet as though it were a retry.
Validate the given packet as though it were a retry.
Validate the given packet as though it were a retry .
pub fn is_valid_retry(&self, odcid: &ConnectionId) -> bool {
        if self.packet_type != PacketType::Retry {
            return false;
        }
        let version = self.version.unwrap();
        let expansion = retry::expansion(version);
        if self.data.len() <= expansion {
            return false;
        }
        let (header, tag) = self.data.split_at(self.data.len() - expansion);
        let mut encoder = Encoder::with_capacity(self.data.len());
        encoder.encode_vec(1, odcid);
        encoder.encode(header);
        retry::use_aead(version, |aead| {
            let mut buf = vec![0; expansion];
            Ok(aead.decrypt(0, &encoder, tag, &mut buf)?.is_empty())
        })
        .unwrap_or(false)
    }
pub fn is_valid_retry ( & self , odcid : & ConnectionId ) -> bool { if self . packet_type != PacketType :: Retry { return false ; } let version = self . version . unwrap ( ) ; let expansion = retry :: expansion ( version ) ; if self . data . len ( ) <= expansion { return false ; } let ( header , tag ) = self . data . split_at ( self . data . len ( ) - expansion ) ; let mut encoder = Encoder :: with_capacity ( self . data . len ( ) ) ; encoder . encode_vec ( 1 , odcid ) ; encoder . encode ( header ) ; retry :: use_aead ( version , | aead | { let mut buf = vec ! [ 0 expansion ] ; Ok ( aead . decrypt ( 0 , & encoder , tag , & mut buf ) ? . is_empty ( ) ) } ) . unwrap_or ( false ) }
Validate the given packet as though it were a retry.
Validate the given packet as though it were a retry .
&self
odcid
&ConnectionId