[−][src]Struct ece::Aes128GcmEceWebPush
Methods
impl<C> Aes128GcmEceWebPush<C> where
C: Crypto,
[src]
C: Crypto,
pub fn encrypt(
remote_pub_key: &C::RemotePublicKey,
auth_secret: &[u8],
plaintext: &[u8],
params: WebPushParams
) -> Result<Vec<u8>>
[src]
remote_pub_key: &C::RemotePublicKey,
auth_secret: &[u8],
plaintext: &[u8],
params: WebPushParams
) -> Result<Vec<u8>>
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]
local_prv_key: &C::LocalKeyPair,
remote_pub_key: &C::RemotePublicKey,
auth_secret: &[u8],
plaintext: &[u8],
params: WebPushParams
) -> Result<Vec<u8>>
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]
local_prv_key: &C::LocalKeyPair,
auth_secret: &[u8],
payload: &[u8]
) -> Result<Vec<u8>>
Decrypts a Web Push message encrypted using the "aes128gcm" scheme.
Auto Trait Implementations
impl<C> Send for Aes128GcmEceWebPush<C> where
C: Send,
C: Send,
impl<C> Sync for Aes128GcmEceWebPush<C> where
C: Sync,
C: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same for T
type Output = T
Should always be Self