跳到主要内容

Tls13CipherSuite

结构体 Tls13CipherSuite 

Source
pub struct Tls13CipherSuite {
    pub common: CipherSuiteCommon,
    pub hkdf_provider: &'static dyn Hkdf,
    pub aead_alg: &'static dyn Tls13AeadAlgorithm,
    pub quic: Option<&'static dyn Algorithm>,
}
展开描述

TLS 1.3 密码套件 supported by rustls.

字段§

§common: CipherSuiteCommon

共用的密码包字段。

§hkdf_provider: &'static dyn Hkdf

How 到 complete HKDF with the suite’s hash function.

If you have 一个 HKDF implementation, you should directly implement the crypto::tls13::Hkdf trait (并 associated)。

If not, you can implement the crypto::hmac::Hmac trait (并 associated), 并 then use crypto::tls13::HkdfUsingHmac

§aead_alg: &'static dyn Tls13AeadAlgorithm

How 到 produce 一个 MessageDecrypterMessageEncrypter 从 raw 密钥材料。

§quic: Option<&'static dyn Algorithm>

How 到 create QUIC header 并 record protection algorithms 用于 this 套件)。

Provide None 到 opt out of QUIC support 用于 this 套件)。 It will not be offered in QUIC handshakes.

实现§

Source§

impl Tls13CipherSuite

Source

pub fn can_resume_from(&self, prev: &'static Self) -> Option<&'static Self>

Can 一个 session using suite self resume 从 suite prev?

Source

pub fn fips(&self) -> bool

Return true if this is 由 FIPS 批准的实现支持。

This means all the constituent parts that do cryptography return true 用于 fips()

Source

pub fn quic_suite(&'static self) -> Option<Suite>

Returns 一个 quic::Suite 用于 the ciphersuite, if supported.

Trait 实现§

Source§

impl Debug for Tls13CipherSuite

Source§

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

使用给定的格式化器格式化此值。 更多信息
Source§

impl From<&'static Tls13CipherSuite> for SupportedCipherSuite

Source§

fn from(s: &'static Tls13CipherSuite) -> Self

从输入类型转换为此类型。
Source§

impl PartialEq for Tls13CipherSuite

Source§

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

测试 selfother 值是否相等,供 == 运算符使用。
1.0.0 · Source§

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

测试 != 运算符。默认实现几乎总是够用,除非有非常充分的理由,否则不应被覆盖。

自动 Trait 实现§

Blanket 实现§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. 更多信息
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows 从 an owned value. 更多信息
Source§

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

Source§

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

Mutably borrows 从 an owned value. 更多信息
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

原样返回传入的参数。

Source§

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

Source§

fn into(self) -> U

Calls U::从(self)

That is, this conversion is whatever the implementation of From<T> 用于 U 的实现方式。

Source§

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

Source§

type Error = Infallible

转换出错时返回的类型。
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

执行转换。
Source§

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

Source§

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

转换出错时返回的类型。
Source§

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

执行转换。