pub struct AesGcmEncryptedBlock { /* private fields */ }
Expand description
Struct representing the result of encrypting with the “aesgcm” scheme.
Since the “aesgcm” scheme needs to represent some data in HTTP headers and other data in the encoded body, we need to represent it with a structure rather than just with raw bytes.
Implementations§
Source§impl AesGcmEncryptedBlock
impl AesGcmEncryptedBlock
pub fn new( dh: &[u8], salt: &[u8], rs: u32, ciphertext: Vec<u8>, ) -> Result<AesGcmEncryptedBlock>
Sourcepub fn headers(
&self,
vapid_public_key: Option<&[u8]>,
) -> Vec<(&'static str, String)>
pub fn headers( &self, vapid_public_key: Option<&[u8]>, ) -> Vec<(&'static str, String)>
Return the headers Hash.
If you’re using VAPID, provide the p256ecdsa
public key that signed the Json Web Token
so it can be included in the Crypto-Key
field.
Disclaimer : You will need to manually add the Authorization field for VAPID containing the JSON Web Token
Auto Trait Implementations§
impl Freeze for AesGcmEncryptedBlock
impl RefUnwindSafe for AesGcmEncryptedBlock
impl Send for AesGcmEncryptedBlock
impl Sync for AesGcmEncryptedBlock
impl Unpin for AesGcmEncryptedBlock
impl UnwindSafe for AesGcmEncryptedBlock
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more