[][src]Trait lorawan::keys::CryptoFactory

pub trait CryptoFactory {
    type E: Encrypter;
    type D: Decrypter;
    type M: Mac;
    pub fn new_enc(&self, key: &AES128) -> Self::E;
pub fn new_dec(&self, key: &AES128) -> Self::D;
pub fn new_mac(&self, key: &AES128) -> Self::M; }

Represents an abstraction over the crypto functions.

This trait provides a way to pick a different implementation of the crypto primitives.

Associated Types

Loading content...

Required methods

pub fn new_enc(&self, key: &AES128) -> Self::E[src]

Method that creates an Encrypter.

pub fn new_dec(&self, key: &AES128) -> Self::D[src]

Method that creates a Decrypter.

pub fn new_mac(&self, key: &AES128) -> Self::M[src]

Method that creates a MAC calculator.

Loading content...

Implementors

impl CryptoFactory for DefaultFactory[src]

type E = Aes128

type D = Aes128

type M = Cmac

Loading content...