[][src]Struct vru_sphinx::AuthenticatedMessage

pub struct AuthenticatedMessage<B, L, N, P> where
    B: Sphinx,
    L: ArrayLength<u8>,
    N: ArrayLength<PayloadHmac<L, B::MacLength>>,
    P: AsMut<[u8]>, 
{ /* fields omitted */ }

Implementations

impl<B, L, N, P> AuthenticatedMessage<B, L, N, P> where
    B: Sphinx,
    L: ArrayLength<u8>,
    N: ArrayLength<PayloadHmac<L, B::MacLength>> + ArrayLength<SharedSecret<B::AsymmetricKey>>,
    P: AsMut<[u8]>, 
[src]

pub fn new<T, H>(
    data: GlobalData<B::AsymmetricKey, N>,
    associated_data: T,
    payloads: H,
    message: P
) -> Self where
    T: AsRef<[u8]>,
    H: Iterator<Item = GenericArray<u8, L>> + DoubleEndedIterator + ExactSizeIterator
[src]

pub fn process<T>(
    self,
    associated_data: T,
    local: &LocalData<B::AsymmetricKey>
) -> Result<Processed<B, L, N, P>, ()> where
    T: AsRef<[u8]>, 
[src]

Trait Implementations

impl<B, L, N, P> Debug for AuthenticatedMessage<B, L, N, P> where
    B: Sphinx,
    B::AsymmetricKey: Debug,
    L: ArrayLength<u8>,
    N: ArrayLength<PayloadHmac<L, B::MacLength>>,
    P: Debug + AsMut<[u8]>, 
[src]

impl<B, L, N, P> Eq for AuthenticatedMessage<B, L, N, P> where
    B: Sphinx,
    B::AsymmetricKey: PartialEq,
    L: ArrayLength<u8>,
    N: ArrayLength<PayloadHmac<L, B::MacLength>>,
    P: PartialEq + AsMut<[u8]>, 
[src]

impl<B, L, N, P> PartialEq<AuthenticatedMessage<B, L, N, P>> for AuthenticatedMessage<B, L, N, P> where
    B: Sphinx,
    B::AsymmetricKey: PartialEq,
    L: ArrayLength<u8>,
    N: ArrayLength<PayloadHmac<L, B::MacLength>>,
    P: PartialEq + AsMut<[u8]>, 
[src]

Auto Trait Implementations

impl<B, L, N, P> RefUnwindSafe for AuthenticatedMessage<B, L, N, P> where
    P: RefUnwindSafe,
    <N as ArrayLength<PayloadHmac<L, <B as Sphinx>::MacLength>>>::ArrayType: RefUnwindSafe,
    <<B as Sphinx>::MacLength as ArrayLength<u8>>::ArrayType: RefUnwindSafe

impl<B, L, N, P> Send for AuthenticatedMessage<B, L, N, P> where
    P: Send,
    <B as Sphinx>::MacLength: ArrayLength<u8>, 

impl<B, L, N, P> Sync for AuthenticatedMessage<B, L, N, P> where
    P: Sync,
    <B as Sphinx>::MacLength: ArrayLength<u8>, 

impl<B, L, N, P> Unpin for AuthenticatedMessage<B, L, N, P> where
    P: Unpin,
    <N as ArrayLength<PayloadHmac<L, <B as Sphinx>::MacLength>>>::ArrayType: Unpin,
    <<B as Sphinx>::MacLength as ArrayLength<u8>>::ArrayType: Unpin

impl<B, L, N, P> UnwindSafe for AuthenticatedMessage<B, L, N, P> where
    P: UnwindSafe,
    <N as ArrayLength<PayloadHmac<L, <B as Sphinx>::MacLength>>>::ArrayType: UnwindSafe,
    <<B as Sphinx>::MacLength as ArrayLength<u8>>::ArrayType: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.