AesType

Trait AesType 

Source
pub trait AesType: 'static {
    type KeySize: ArrayLength<u8>;

    const ALG_TYPE: AesTypes;
    const JWK_ALG: &'static str;
}
Available on crate feature aes only.
Expand description

Trait implemented by supported AES authenticated encryption algorithms

Required Associated Constants§

Source

const ALG_TYPE: AesTypes

The associated algorithm type

Source

const JWK_ALG: &'static str

The associated JWK algorithm name

Required Associated Types§

Source

type KeySize: ArrayLength<u8>

The size of the key secret bytes

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl AesType for A128CbcHs256

Source§

const ALG_TYPE: AesTypes = AesTypes::A128CbcHs256

Source§

const JWK_ALG: &'static str = "A128CBC-HS256"

Source§

type KeySize = UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>

Source§

impl AesType for A128Gcm

Source§

const ALG_TYPE: AesTypes = AesTypes::A128Gcm

Source§

const JWK_ALG: &'static str = "A128GCM"

Source§

type KeySize = <AesGcm<Aes128, UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>> as KeySizeUser>::KeySize

Source§

impl AesType for A128Kw

Source§

const ALG_TYPE: AesTypes = AesTypes::A128Kw

Source§

const JWK_ALG: &'static str = "A128KW"

Source§

type KeySize = <Aes128 as KeySizeUser>::KeySize

Source§

impl AesType for A256CbcHs512

Source§

const ALG_TYPE: AesTypes = AesTypes::A256CbcHs512

Source§

const JWK_ALG: &'static str = "A256CBC-HS512"

Source§

type KeySize = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>

Source§

impl AesType for A256Gcm

Source§

const ALG_TYPE: AesTypes = AesTypes::A256Gcm

Source§

const JWK_ALG: &'static str = "A256GCM"

Source§

type KeySize = <AesGcm<Aes256, UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>> as KeySizeUser>::KeySize

Source§

impl AesType for A256Kw

Source§

const ALG_TYPE: AesTypes = AesTypes::A256Kw

Source§

const JWK_ALG: &'static str = "A256KW"

Source§

type KeySize = <Aes256 as KeySizeUser>::KeySize