Skip to main content

HintSized

Trait HintSized 

Source
pub trait HintSized<K: KeyPair, A: AeadCore, L: ArraySize>: Sized {
    type CiphertextSize: ArraySize;
    type Size: ArraySize;
}
Expand description

Provides compile-time size information for Hint serialization.

The associated types give access to the ciphertext and total hint sizes, computed from the key pair, AEAD algorithm, and message length.

Required Associated Types§

Source

type CiphertextSize: ArraySize

Ciphertext size: AEAD tag size plus message length.

Source

type Size: ArraySize

Total hint size: public key size plus ciphertext size.

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<K: KeyPair, A: Aead + KeyInit, L: ArraySize> HintSized<K, A, L> for Hint<K, A, L>
where <A as AeadCore>::TagSize: Add<L>, <<A as AeadCore>::TagSize as Add<L>>::Output: ArraySize, <K as KeyPair>::PublicKeySize: Add<Sum<<A as AeadCore>::TagSize, L>>, <<K as KeyPair>::PublicKeySize as Add<Sum<<A as AeadCore>::TagSize, L>>>::Output: ArraySize,

Source§

type CiphertextSize = <<A as AeadCore>::TagSize as Add<L>>::Output

Source§

type Size = <<K as KeyPair>::PublicKeySize as Add<<<A as AeadCore>::TagSize as Add<L>>::Output>>::Output