Skip to main content

Dtls12CipherSuite

Struct Dtls12CipherSuite 

Source
pub struct Dtls12CipherSuite(/* private fields */);
Expand description

Supported TLS 1.2 cipher suites for DTLS.

Implementations§

Source§

impl Dtls12CipherSuite

Source

pub const ECDHE_ECDSA_AES256_GCM_SHA384: Self

ECDHE with ECDSA authentication, AES-256-GCM, SHA-384.

Source

pub const ECDHE_ECDSA_AES128_GCM_SHA256: Self

ECDHE with ECDSA authentication, AES-128-GCM, SHA-256.

Source

pub const ECDHE_ECDSA_CHACHA20_POLY1305_SHA256: Self

ECDHE with ECDSA authentication, ChaCha20-Poly1305, SHA-256.

Source

pub const PSK_AES128_CCM_8: Self

PSK with AES-128-CCM-8 (8-byte tag), SHA-256.

Source

pub const fn from_u16(value: u16) -> Self

Convert the 16-bit IANA value to a Dtls12CipherSuite.

Source

pub const fn as_u16(&self) -> u16

Return the 16-bit IANA value for this cipher suite.

Source

pub const fn is_unknown(&self) -> bool

Returns true if this is not a known DTLS 1.2 cipher suite wire value.

Source

pub fn parse(input: &[u8]) -> IResult<&[u8], Dtls12CipherSuite>

Parse a Dtls12CipherSuite from network byte order.

Source

pub fn verify_data_length(&self) -> usize

Length in bytes of verify_data for Finished MACs.

Source

pub fn as_key_exchange_algorithm(&self) -> KeyExchangeAlgorithm

The key exchange algorithm family for this cipher suite.

Source

pub fn has_ecc(&self) -> bool

Whether this cipher suite uses ECC-based key exchange.

Source

pub fn is_psk(&self) -> bool

Whether this cipher suite uses PSK (Pre-Shared Key) key exchange.

Source

pub const fn all() -> &'static [Dtls12CipherSuite; 4]

All supported cipher suites in server preference order.

Source

pub fn compatible_with_certificate( cert_type: SignatureAlgorithm, ) -> &'static [Dtls12CipherSuite; 3]

Cipher suites compatible with a given certificate’s signature algorithm.

Source

pub fn hash_algorithm(&self) -> HashAlgorithm

The hash algorithm used by this cipher suite.

Source

pub fn signature_algorithm(&self) -> Option<SignatureAlgorithm>

The signature algorithm associated with the suite’s key exchange.

Returns None for PSK cipher suites (no signature authentication).

Source

pub fn is_supported(&self) -> bool

Returns true if this cipher suite is supported by this implementation.

Source

pub const fn supported() -> &'static [Dtls12CipherSuite; 4]

Supported DTLS 1.2 cipher suites in server preference order.

Trait Implementations§

Source§

impl Clone for Dtls12CipherSuite

Source§

fn clone(&self) -> Dtls12CipherSuite

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Dtls12CipherSuite

Source§

impl Debug for Dtls12CipherSuite

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Dtls12CipherSuite

Source§

fn default() -> Dtls12CipherSuite

Returns the “default value” for a type. Read more
Source§

impl Eq for Dtls12CipherSuite

Source§

impl Hash for Dtls12CipherSuite

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Dtls12CipherSuite

Source§

fn eq(&self, other: &Dtls12CipherSuite) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Dtls12CipherSuite

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> CryptoSafe for T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V