Struct tls_parser::TlsCipherSuite
source · pub struct TlsCipherSuite {
pub name: &'static str,
pub id: TlsCipherSuiteID,
pub kx: TlsCipherKx,
pub au: TlsCipherAu,
pub enc: TlsCipherEnc,
pub enc_mode: TlsCipherEncMode,
pub enc_size: u16,
pub mac: TlsCipherMac,
pub mac_size: u16,
pub prf: TlsPRF,
}Expand description
TLS Ciphersuite
A CipherSuite is a set of algorithm and parameters used to secure a network connection.
Fields§
§name: &'static strThe IANA name of this ciphersuite
id: TlsCipherSuiteIDThe 16-bit identifier, provided by IANA, for this ciphersuite
kx: TlsCipherKxThe Key Exchange method for this ciphersuite
au: TlsCipherAuThe Authentication method for this ciphersuite
enc: TlsCipherEncEncryption cipher
enc_mode: TlsCipherEncModeEncryption mode
enc_size: u16Key size of the encryption, in bits
mac: TlsCipherMacMessage Authentication Code (MAC) algorithm
mac_size: u16Message Authentication Code (MAC) length
prf: TlsPRFPseudo-Random Function, if specific
Implementations§
source§impl TlsCipherSuite
impl TlsCipherSuite
sourcepub fn from_id(id: u16) -> Option<&'static TlsCipherSuite>
pub fn from_id(id: u16) -> Option<&'static TlsCipherSuite>
Attempt to get reference on TlsCipherSuite identified by id.
sourcepub fn from_name(name: &str) -> Option<&'static TlsCipherSuite>
pub fn from_name(name: &str) -> Option<&'static TlsCipherSuite>
Attempt to get reference on TlsCipherSuite identified by name.
sourcepub const fn enc_key_size(&self) -> usize
pub const fn enc_key_size(&self) -> usize
Get the key of this ciphersuite encryption algorithm, in bytes
sourcepub const fn enc_block_size(&self) -> usize
pub const fn enc_block_size(&self) -> usize
Get the block size of this ciphersuite encryption algorithm, in bytes
sourcepub const fn mac_length(&self) -> usize
pub const fn mac_length(&self) -> usize
Get the length of this ciphersuite MAC algorithm, in bytes
Trait Implementations§
source§impl Clone for TlsCipherSuite
impl Clone for TlsCipherSuite
source§fn clone(&self) -> TlsCipherSuite
fn clone(&self) -> TlsCipherSuite
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for TlsCipherSuite
impl Debug for TlsCipherSuite
source§impl PartialEq for TlsCipherSuite
impl PartialEq for TlsCipherSuite
source§impl<'a> TryFrom<&'a str> for &'static TlsCipherSuite
impl<'a> TryFrom<&'a str> for &'static TlsCipherSuite
source§impl TryFrom<TlsCipherSuiteID> for &'static TlsCipherSuite
impl TryFrom<TlsCipherSuiteID> for &'static TlsCipherSuite
source§type Error = CipherSuiteNotFound
type Error = CipherSuiteNotFound
source§impl TryFrom<u16> for &'static TlsCipherSuite
impl TryFrom<u16> for &'static TlsCipherSuite
impl Eq for TlsCipherSuite
impl StructuralPartialEq for TlsCipherSuite
Auto Trait Implementations§
impl Freeze for TlsCipherSuite
impl RefUnwindSafe for TlsCipherSuite
impl Send for TlsCipherSuite
impl Sync for TlsCipherSuite
impl Unpin for TlsCipherSuite
impl UnwindSafe for TlsCipherSuite
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)