[][src]Trait snmp_usm::WithLocalizedKey

pub trait WithLocalizedKey<'a, D> {
    fn with_localized_key(localized_key: LocalizedKey<'a, D>) -> Self;
}

Trait implemented by types created with a localized key.

This trait helps simplify code having to create types generically with a localized key.

Required methods

fn with_localized_key(localized_key: LocalizedKey<'a, D>) -> Self

Constructs a new type with a localized key.

Examples

use snmp_usm::{DesPrivKey, LocalizedSha1Key, WithLocalizedKey};

let localized_key = LocalizedSha1Key::new(passwd, engine_id);
let priv_key = DesPrivKey::with_localized_key(localized_key);
Loading content...

Implementors

impl<'a, D> WithLocalizedKey<'a, D> for Aes128PrivKey<'a, D>[src]

impl<'a, D> WithLocalizedKey<'a, D> for DesPrivKey<'a, D>[src]

Loading content...