Struct rustls::crypto::aws_lc_rs::hpke::HpkeAwsLcRs

source ·
pub struct HpkeAwsLcRs<const KEY_SIZE: usize, const KDF_SIZE: usize> { /* private fields */ }
Available on crate feature aws_lc_rs only.
Expand description

HpkeAwsLcRs holds the concrete instantiations of the algorithms specified by the HpkeSuite.

Trait Implementations§

source§

impl<const KEY_SIZE: usize, const KDF_SIZE: usize> Debug for HpkeAwsLcRs<KEY_SIZE, KDF_SIZE>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<const KEY_SIZE: usize, const KDF_SIZE: usize> Hpke for HpkeAwsLcRs<KEY_SIZE, KDF_SIZE>

source§

fn seal( &self, info: &[u8], aad: &[u8], plaintext: &[u8], pub_key: &HpkePublicKey, ) -> Result<(EncapsulatedSecret, Vec<u8>), Error>

Seal the provided plaintext to the recipient public key pub_key with application supplied info, and additional data aad. Read more
source§

fn setup_sealer( &self, info: &[u8], pub_key: &HpkePublicKey, ) -> Result<(EncapsulatedSecret, Box<dyn HpkeSealer + 'static>), Error>

Set up a sealer context for the receiver public key pub_key with application supplied info. Read more
source§

fn open( &self, enc: &EncapsulatedSecret, info: &[u8], aad: &[u8], ciphertext: &[u8], secret_key: &HpkePrivateKey, ) -> Result<Vec<u8>, Error>

Open the provided ciphertext using the encapsulated secret enc, with application supplied info, and additional data aad. Read more
source§

fn setup_opener( &self, enc: &EncapsulatedSecret, info: &[u8], secret_key: &HpkePrivateKey, ) -> Result<Box<dyn HpkeOpener + 'static>, Error>

Set up an opener context for the secret key secret_key with application supplied info. Read more
source§

fn fips(&self) -> bool

Return whether the HPKE instance is FIPS compatible.
source§

fn generate_key_pair(&self) -> Result<(HpkePublicKey, HpkePrivateKey), Error>

Generate a new public key and private key pair compatible with this HPKE instance. Read more
source§

fn suite(&self) -> HpkeSuite

Return the HpkeSuite that this HPKE instance supports.

Auto Trait Implementations§

§

impl<const KEY_SIZE: usize, const KDF_SIZE: usize> Freeze for HpkeAwsLcRs<KEY_SIZE, KDF_SIZE>

§

impl<const KEY_SIZE: usize, const KDF_SIZE: usize> !RefUnwindSafe for HpkeAwsLcRs<KEY_SIZE, KDF_SIZE>

§

impl<const KEY_SIZE: usize, const KDF_SIZE: usize> Send for HpkeAwsLcRs<KEY_SIZE, KDF_SIZE>

§

impl<const KEY_SIZE: usize, const KDF_SIZE: usize> Sync for HpkeAwsLcRs<KEY_SIZE, KDF_SIZE>

§

impl<const KEY_SIZE: usize, const KDF_SIZE: usize> Unpin for HpkeAwsLcRs<KEY_SIZE, KDF_SIZE>

§

impl<const KEY_SIZE: usize, const KDF_SIZE: usize> !UnwindSafe for HpkeAwsLcRs<KEY_SIZE, KDF_SIZE>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.