Trait webrtc_dtls::cipher_suite::CipherSuite

source ·
pub trait CipherSuite {
    // Required methods
    fn to_string(&self) -> String;
    fn id(&self) -> CipherSuiteId;
    fn certificate_type(&self) -> ClientCertificateType;
    fn hash_func(&self) -> CipherSuiteHash;
    fn is_psk(&self) -> bool;
    fn is_initialized(&self) -> bool;
    fn init(
        &mut self,
        master_secret: &[u8],
        client_random: &[u8],
        server_random: &[u8],
        is_client: bool
    ) -> Result<(), Error>;
    fn encrypt(
        &self,
        pkt_rlh: &RecordLayerHeader,
        raw: &[u8]
    ) -> Result<Vec<u8>, Error>;
    fn decrypt(&self, input: &[u8]) -> Result<Vec<u8>, Error>;
}

Required Methods§

source

fn to_string(&self) -> String

source

fn id(&self) -> CipherSuiteId

source

fn certificate_type(&self) -> ClientCertificateType

source

fn hash_func(&self) -> CipherSuiteHash

source

fn is_psk(&self) -> bool

source

fn is_initialized(&self) -> bool

source

fn init( &mut self, master_secret: &[u8], client_random: &[u8], server_random: &[u8], is_client: bool ) -> Result<(), Error>

source

fn encrypt( &self, pkt_rlh: &RecordLayerHeader, raw: &[u8] ) -> Result<Vec<u8>, Error>

source

fn decrypt(&self, input: &[u8]) -> Result<Vec<u8>, Error>

Implementors§