Skip to main content

HintSized

Trait HintSized 

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§

type CiphertextSize: ArraySize

Ciphertext size: AEAD tag size plus message length.

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".

Implementors§

§

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,

§

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

§

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