pub struct Aes128CcmAny { /* private fields */ }Expand description
AES-128-CCM,标签长度运行时可配的全参数实例(RFC 3610 完整参数 空间:M ∈ {4,6,8,10,12,14,16},nonce 7..=13 字节)。
M=4/6 的完整性标签弱于 RFC 3610 作者建议(≥ 8),仅为兼容既有 协议提供;TLS 批准套件面(SP 800-52r2)只使用 M=16(见模块头)。
Implementations§
Source§impl Aes128CcmAny
impl Aes128CcmAny
Sourcepub const APPROVAL: Approval = crate::Approval::Approved
pub const APPROVAL: Approval = crate::Approval::Approved
本算法在 FIPS 140-3 下的批准状态:SP 800-38C 对全部受支持 M 值批准(TLS 批准套件面不含 M=8,见模块头)。
Sourcepub fn new(key: &[u8; 16], tag_len: usize) -> Result<Self, Error>
pub fn new(key: &[u8; 16], tag_len: usize) -> Result<Self, Error>
构造:tag_len 必须 ∈ {4,6,8,10,12,14,16},否则返回
Error::InvalidInput。
Trait Implementations§
Source§impl Clone for Aes128CcmAny
impl Clone for Aes128CcmAny
Source§fn clone(&self) -> Aes128CcmAny
fn clone(&self) -> Aes128CcmAny
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Aes128CcmAny
impl RefUnwindSafe for Aes128CcmAny
impl Send for Aes128CcmAny
impl Sync for Aes128CcmAny
impl Unpin for Aes128CcmAny
impl UnsafeUnpin for Aes128CcmAny
impl UnwindSafe for Aes128CcmAny
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
Mutably borrows from an owned value. Read more