[][src]Struct snmp_usm::LocalizedKey

pub struct LocalizedKey<'a, D> { /* fields omitted */ }

Localized key used to verify the identity of users, verify the integrity of messages and encrypt messages.

LocalizedKey is parametrize to use different message-digest algorithms. A key is unique for a user at an authoritative SNMP engine. It's usually cached by the security subsystem.

Implementations

impl<'a, D> LocalizedKey<'a, D> where
    D: Update + FixedOutput + Reset + Default + Clone
[src]

pub fn new(passwd: &[u8], engine_id: &[u8]) -> Self[src]

Creates a key from a user password and an authoritative engine ID.

The password should be at least 8 characters in length.

Panics

Panics if passwd has length 0.

Examples

use snmp_usm::LocalizedMd5Key;

let key = LocalizedMd5Key::new(b"password", b"engine_id");

Trait Implementations

impl<'a, D: Clone> Clone for LocalizedKey<'a, D>[src]

impl<'a, D: Debug> Debug for LocalizedKey<'a, D>[src]

impl<'a, D: Eq> Eq for LocalizedKey<'a, D>[src]

impl<'a, D: Hash> Hash for LocalizedKey<'a, D>[src]

impl<'a, D: PartialEq> PartialEq<LocalizedKey<'a, D>> for LocalizedKey<'a, D>[src]

impl<'a, D> StructuralEq for LocalizedKey<'a, D>[src]

impl<'a, D> StructuralPartialEq for LocalizedKey<'a, D>[src]

Auto Trait Implementations

impl<'a, D> RefUnwindSafe for LocalizedKey<'a, D> where
    D: RefUnwindSafe

impl<'a, D> Send for LocalizedKey<'a, D> where
    D: Sync

impl<'a, D> Sync for LocalizedKey<'a, D> where
    D: Sync

impl<'a, D> Unpin for LocalizedKey<'a, D>

impl<'a, D> UnwindSafe for LocalizedKey<'a, D> where
    D: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.