[][src]Struct ece::AesGcmEncryptedBlock

pub struct AesGcmEncryptedBlock {
    pub dh: Vec<u8>,
    pub salt: Vec<u8>,
    pub rs: u32,
    pub ciphertext: Vec<u8>,
}

Fields

dh: Vec<u8>salt: Vec<u8>rs: u32ciphertext: Vec<u8>

Methods

impl AesGcmEncryptedBlock[src]

pub fn aesgcm_rs(rs: u32) -> u32[src]

pub fn new(
    dh: &[u8],
    salt: &[u8],
    rs: u32,
    ciphertext: Vec<u8>
) -> Result<AesGcmEncryptedBlock>
[src]

Create a new block from the various header strings and body content.

pub fn headers(self) -> HashMap<String, String>[src]

Return the headers Hash, NOTE you may need to merge Crypto-Key if there's already a VAPID element present.

pub fn body(self) -> String[src]

Encode the body as a String. If you need the bytes, probably just call .ciphertext directly

Auto Trait Implementations

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