core_crypto::prelude

Struct MlsCiphersuite

source
pub struct MlsCiphersuite(/* private fields */);
Expand description

A wrapper for the OpenMLS Ciphersuite, so that we are able to provide a default value.

Methods from Deref<Target = Ciphersuite>§

pub fn hash_algorithm(&self) -> HashType

Get the [HashType] for this Ciphersuite

pub fn signature_algorithm(&self) -> SignatureScheme

Get the [SignatureScheme] for this Ciphersuite.

pub fn aead_algorithm(&self) -> AeadType

Get the [AeadType] for this Ciphersuite.

pub fn hpke_kdf_algorithm(&self) -> HpkeKdfType

Get the [HpkeKdfType] for this Ciphersuite.

pub fn hpke_kem_algorithm(&self) -> HpkeKemType

Get the [HpkeKemType] for this Ciphersuite.

pub fn hpke_aead_algorithm(&self) -> HpkeAeadType

Get the [HpkeAeadType] for this Ciphersuite.

pub fn hpke_config(&self) -> HpkeConfig

Get the [HpkeConfig] for this Ciphersuite.

pub fn hash_length(&self) -> usize

Get the length of the used hash algorithm.

pub fn mac_length(&self) -> usize

Get the length of the AEAD tag.

pub fn aead_key_length(&self) -> usize

Returns the key size of the used AEAD.

pub fn aead_nonce_length(&self) -> usize

Returns the length of the nonce of the AEAD.

Trait Implementations§

source§

impl Clone for MlsCiphersuite

source§

fn clone(&self) -> MlsCiphersuite

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MlsCiphersuite

source§

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

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

impl Default for MlsCiphersuite

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Deref for MlsCiphersuite

source§

type Target = Ciphersuite

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<'de> Deserialize<'de> for MlsCiphersuite

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<Ciphersuite> for MlsCiphersuite

source§

fn from(value: Ciphersuite) -> Self

Converts to this type from the input type.
source§

impl From<MlsCiphersuite> for Ciphersuite

source§

fn from(ciphersuite: MlsCiphersuite) -> Self

Converts to this type from the input type.
source§

impl From<MlsCiphersuite> for u16

source§

fn from(cs: MlsCiphersuite) -> Self

Converts to this type from the input type.
source§

impl Hash for MlsCiphersuite

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for MlsCiphersuite

source§

fn eq(&self, other: &MlsCiphersuite) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for MlsCiphersuite

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryFrom<MlsCiphersuite> for JwsAlgorithm

source§

type Error = E2eIdentityError

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

fn try_from(cs: MlsCiphersuite) -> E2eIdentityResult<Self>

Performs the conversion.
source§

impl TryFrom<u16> for MlsCiphersuite

source§

type Error = CryptoError

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

fn try_from(c: u16) -> CryptoResult<Self>

Performs the conversion.
source§

impl Copy for MlsCiphersuite

source§

impl Eq for MlsCiphersuite

source§

impl StructuralPartialEq for MlsCiphersuite

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, UT> HandleAlloc<UT> for T
where T: Send + Sync,

§

fn new_handle(value: Arc<T>) -> Handle

Create a new handle for an Arc value Read more
§

unsafe fn clone_handle(handle: Handle) -> Handle

Clone a handle Read more
§

unsafe fn consume_handle(handle: Handle) -> Arc<T>

Consume a handle, getting back the initial Arc<> Read more
§

unsafe fn get_arc(handle: Handle) -> Arc<Self>

Get a clone of the Arc<> using a “borrowed” handle. Read more
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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

source§

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>,

source§

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T