Struct rustls::ticketer::AeadTicketer
source · struct AeadTicketer {
alg: &'static Algorithm,
key: LessSafeKey,
lifetime: u32,
}
Expand description
This is a ProducesTickets
implementation which uses
any ring aead::Algorithm
to encrypt and authentication
the ticket payload. It does not enforce any lifetime
constraint.
Fields§
§alg: &'static Algorithm
§key: LessSafeKey
§lifetime: u32
Implementations§
source§impl AeadTicketer
impl AeadTicketer
sourcefn new() -> Result<Self, GetRandomFailed>
fn new() -> Result<Self, GetRandomFailed>
Make a ticketer with recommended configuration and a random key.
Trait Implementations§
source§impl ProducesTickets for AeadTicketer
impl ProducesTickets for AeadTicketer
source§fn encrypt(&self, message: &[u8]) -> Option<Vec<u8>>
fn encrypt(&self, message: &[u8]) -> Option<Vec<u8>>
Encrypt message
and return the ciphertext.
source§fn decrypt(&self, ciphertext: &[u8]) -> Option<Vec<u8>>
fn decrypt(&self, ciphertext: &[u8]) -> Option<Vec<u8>>
Decrypt ciphertext
and recover the original message.
Auto Trait Implementations§
impl Freeze for AeadTicketer
impl RefUnwindSafe for AeadTicketer
impl Send for AeadTicketer
impl Sync for AeadTicketer
impl Unpin for AeadTicketer
impl UnwindSafe for AeadTicketer
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