跳到主要内容

KeyBlockShape

结构体 KeyBlockShape 

Source
pub struct KeyBlockShape {
    pub enc_key_len: usize,
    pub fixed_iv_len: usize,
    pub explicit_nonce_len: usize,
}
展开描述

How 一个 TLS1.2 key_block is partitioned.

注:当前不支持 mac_key_length 非零的密码包。

字段§

§enc_key_len: usize

How long keys are.

enc_key_length terminology is 从 标准 (RFC5246 A.6)。

§fixed_iv_len: usize

How long the fixed part of the ‘IV’ is.

fixed_iv_length terminology is 从 标准 (RFC5246 A.6)。

This isn’t usually an IV, but we continue the terminology misuse 到 match 标准.

§explicit_nonce_len: usize

This 是 non-标准 extension which extends the key block 到 provide an initial explicit nonce offset, in 一个 deterministic 并 safe way. GCM needs this, chacha20poly1305 works this way by design.

自动 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>

执行转换。