Struct MlKemPrivateKey

Source
pub struct MlKemPrivateKey<const SIZE: usize> { /* private fields */ }
Expand description

An ML-KEM Private key

Implementations§

Source§

impl<const SIZE: usize> MlKemPrivateKey<SIZE>

Source

pub fn as_slice(&self) -> &[u8; SIZE]

A reference to the raw byte slice.

Source

pub const fn len() -> usize

The number of bytes

Trait Implementations§

Source§

impl<const SIZE: usize> AsRef<[u8]> for MlKemPrivateKey<SIZE>

Source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<const SIZE: usize> Default for MlKemPrivateKey<SIZE>

Source§

fn default() -> Self

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

impl<const SIZE: usize> From<&[u8; SIZE]> for MlKemPrivateKey<SIZE>

Source§

fn from(value: &[u8; SIZE]) -> Self

Converts to this type from the input type.
Source§

impl<const SIZE: usize> From<[u8; SIZE]> for MlKemPrivateKey<SIZE>

Source§

fn from(value: [u8; SIZE]) -> Self

Converts to this type from the input type.
Source§

impl<const SIZE: usize> From<MlKemPrivateKey<SIZE>> for [u8; SIZE]

Source§

fn from(value: MlKemPrivateKey<SIZE>) -> Self

Converts to this type from the input type.
Source§

impl<const SIZE: usize> Index<Range<usize>> for MlKemPrivateKey<SIZE>

Source§

type Output = [u8]

The returned type after indexing.
Source§

fn index(&self, range: Range<usize>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<const SIZE: usize> Index<RangeFrom<usize>> for MlKemPrivateKey<SIZE>

Source§

type Output = [u8]

The returned type after indexing.
Source§

fn index(&self, range: RangeFrom<usize>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<const SIZE: usize> Index<RangeTo<usize>> for MlKemPrivateKey<SIZE>

Source§

type Output = [u8]

The returned type after indexing.
Source§

fn index(&self, range: RangeTo<usize>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<const SIZE: usize> Index<usize> for MlKemPrivateKey<SIZE>

Source§

type Output = u8

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<const SIZE: usize> IndexMut<Range<usize>> for MlKemPrivateKey<SIZE>

Source§

fn index_mut(&mut self, range: Range<usize>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<const SIZE: usize> IndexMut<RangeFrom<usize>> for MlKemPrivateKey<SIZE>

Source§

fn index_mut(&mut self, range: RangeFrom<usize>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<const SIZE: usize> IndexMut<RangeTo<usize>> for MlKemPrivateKey<SIZE>

Source§

fn index_mut(&mut self, range: RangeTo<usize>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<const SIZE: usize> IndexMut<usize> for MlKemPrivateKey<SIZE>

Source§

fn index_mut(&mut self, range: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<const SIZE: usize> TryFrom<&[u8]> for MlKemPrivateKey<SIZE>

Source§

type Error = TryFromSliceError

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

fn try_from(value: &[u8]) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<const SIZE: usize> Freeze for MlKemPrivateKey<SIZE>

§

impl<const SIZE: usize> RefUnwindSafe for MlKemPrivateKey<SIZE>

§

impl<const SIZE: usize> Send for MlKemPrivateKey<SIZE>

§

impl<const SIZE: usize> Sync for MlKemPrivateKey<SIZE>

§

impl<const SIZE: usize> Unpin for MlKemPrivateKey<SIZE>

§

impl<const SIZE: usize> UnwindSafe for MlKemPrivateKey<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> Classify for T

Source§

type Classified = T

Source§

fn classify(self) -> T

Source§

impl<T> Declassify for T

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

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.