[][src]Struct ece::Aes128GcmEceWebPush

pub struct Aes128GcmEceWebPush<C> where
    C: Crypto
{ /* fields omitted */ }

Methods

impl<C> Aes128GcmEceWebPush<C> where
    C: Crypto
[src]

pub fn encrypt(
    remote_pub_key: &C::RemotePublicKey,
    auth_secret: &[u8],
    plaintext: &[u8],
    params: WebPushParams
) -> Result<Vec<u8>>
[src]

Encrypts a Web Push message using the "aes128gcm" scheme. This function automatically generates an ephemeral ECDH key pair.

pub fn encrypt_with_keys(
    local_prv_key: &C::LocalKeyPair,
    remote_pub_key: &C::RemotePublicKey,
    auth_secret: &[u8],
    plaintext: &[u8],
    params: WebPushParams
) -> Result<Vec<u8>>
[src]

Encrypts a Web Push message using the "aes128gcm" scheme, with an explicit sender key. The sender key can be reused.

pub fn decrypt(
    local_prv_key: &C::LocalKeyPair,
    auth_secret: &[u8],
    payload: &[u8]
) -> Result<Vec<u8>>
[src]

Decrypts a Web Push message encrypted using the "aes128gcm" scheme.

Auto Trait Implementations

impl<C> Send for Aes128GcmEceWebPush<C> where
    C: Send

impl<C> Sync for Aes128GcmEceWebPush<C> where
    C: Sync

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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

impl<T> Same for T

type Output = T

Should always be Self