pub enum SecuritySuite {
Suite0,
Suite1,
Suite2,
}Expand description
A DLMS/COSEM security suite (IEC 62056-5-3, 5.3.7).
Variants§
Suite0
Suite 0 — AES-GCM-128, AES-128 key wrap. No PKI.
Suite1
Suite 1 — ECDH-ECDSA-AES-GCM-128-SHA-256 (curve P-256).
Suite2
Suite 2 — ECDH-ECDSA-AES-GCM-256-SHA-384 (curve P-384).
Implementations§
Source§impl SecuritySuite
impl SecuritySuite
Sourcepub fn from_id(id: u8) -> Option<SecuritySuite>
pub fn from_id(id: u8) -> Option<SecuritySuite>
Parses a suite from its id.
Sourcepub fn aes_key_len(&self) -> usize
pub fn aes_key_len(&self) -> usize
The AES key length in octets for authenticated encryption (16 or 32).
Sourcepub fn has_public_key(&self) -> bool
pub fn has_public_key(&self) -> bool
Whether the suite provides digital signatures and key agreement (PKI).
Trait Implementations§
Source§impl Clone for SecuritySuite
impl Clone for SecuritySuite
Source§fn clone(&self) -> SecuritySuite
fn clone(&self) -> SecuritySuite
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 moreimpl Copy for SecuritySuite
Source§impl Debug for SecuritySuite
impl Debug for SecuritySuite
impl Eq for SecuritySuite
Source§impl PartialEq for SecuritySuite
impl PartialEq for SecuritySuite
impl StructuralPartialEq for SecuritySuite
Auto Trait Implementations§
impl Freeze for SecuritySuite
impl RefUnwindSafe for SecuritySuite
impl Send for SecuritySuite
impl Sync for SecuritySuite
impl Unpin for SecuritySuite
impl UnsafeUnpin for SecuritySuite
impl UnwindSafe for SecuritySuite
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