Trait RelayCryptState

Source
pub trait RelayCryptState {
    // Required methods
    fn originate(&mut self, cell: &mut RelayBody);
    fn encrypt(&mut self, cell: &mut RelayBody);
    fn decrypt(&mut self, cell: &mut RelayBody);
}
Available on crate feature bench only.
Expand description

Public trait to define the interface of a wrapper around a relay cryptographic state.

Required Methods§

Source

fn originate(&mut self, cell: &mut RelayBody)

Public wrapper around the InboundRelayLayer::originate method.

Source

fn encrypt(&mut self, cell: &mut RelayBody)

Public wrapper around the InboundRelayLayer::encrypt_inbound method.

Source

fn decrypt(&mut self, cell: &mut RelayBody)

Public wrapper around the OutboundRelayLayer::decrypt_outbound method.

Implementors§

Source§

impl<EtBC: BlkCipherEnc, PrfBC: BlkCipherEnc> RelayCryptState for CgoRelayCryptState<EtBC, PrfBC>

Available on crate feature counter-galois-onion only.
Source§

impl<SC: StreamCipher + KeyIvInit, D: Digest + Clone> RelayCryptState for Tor1RelayCryptState<SC, D>