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 str
The IANA name of this ciphersuite
id: TlsCipherSuiteID
The 16-bit identifier, provided by IANA, for this ciphersuite
kx: TlsCipherKx
The Key Exchange method for this ciphersuite
au: TlsCipherAu
The Authentication method for this ciphersuite
enc: TlsCipherEnc
Encryption cipher
enc_mode: TlsCipherEncMode
Encryption mode
enc_size: u16
Key size of the encryption, in bits
mac: TlsCipherMac
Message Authentication Code (MAC) algorithm
mac_size: u16
Message Authentication Code (MAC) length
prf: TlsPRF
Pseudo-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 more