diff --git a/hpke_rs/enum.HpkeError.html b/hpke_rs/enum.HpkeError.html index 3a5640c..7ef5f2f 100644 --- a/hpke_rs/enum.HpkeError.html +++ b/hpke_rs/enum.HpkeError.html @@ -1,4 +1,4 @@ -HpkeError in hpke_rs - Rust

Enum hpke_rs::HpkeError

source ·
pub enum HpkeError {
+HpkeError in hpke_rs - Rust

Enum hpke_rs::HpkeError

source ·
pub enum HpkeError {
     OpenError,
     InvalidConfig,
     InvalidInput,
@@ -10,7 +10,6 @@
     CryptoError(String),
     MessageLimitReached,
     InsufficientRandomness,
-    LockPoisoned,
 }
Expand description

HPKE Error types.

Variants§

§

OpenError

Error opening an HPKE ciphertext.

§

InvalidConfig

Invalid configuration or arguments.

@@ -23,10 +22,9 @@
§

CryptoError(String)

An error in the crypto library occurred.

§

MessageLimitReached

The message limit for this AEAD, key, and nonce.

§

InsufficientRandomness

Unable to collect enough randomness.

-
§

LockPoisoned

A concurrency issue with an RwLock.

-

Trait Implementations§

source§

impl Clone for HpkeError

source§

fn clone(&self) -> HpkeError

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 HpkeError

source§

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

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

impl Display for HpkeError

source§

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

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

impl Error for HpkeError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Error> for HpkeError

source§

fn from(e: Error) -> Self

Converts to this type from the input type.
source§

impl PartialEq<HpkeError> for HpkeError

source§

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

This method tests for self and other values to be equal, and is used +

Trait Implementations§

source§

impl Clone for HpkeError

source§

fn clone(&self) -> HpkeError

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 HpkeError

source§

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

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

impl Display for HpkeError

source§

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

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

impl Error for HpkeError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Error> for HpkeError

source§

fn from(e: Error) -> Self

Converts to this type from the input type.
source§

impl PartialEq<HpkeError> for HpkeError

source§

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

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

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

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

impl StructuralPartialEq for HpkeError

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere +sufficient, and should not be overridden without very good reason.

source§

impl StructuralPartialEq for HpkeError

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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.

diff --git a/hpke_rs/enum.Mode.html b/hpke_rs/enum.Mode.html index 97c29d8..ae7db6c 100644 --- a/hpke_rs/enum.Mode.html +++ b/hpke_rs/enum.Mode.html @@ -1,4 +1,4 @@ -Mode in hpke_rs - Rust

Trait Implementations§

source§

impl Clone for Mode

source§

fn clone(&self) -> Mode

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 Mode

source§

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

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

impl<'de> Deserialize<'de> for Mode

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 Display for Mode

source§

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

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

impl PartialEq<Mode> for Mode

source§

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

This method tests for self and other values to be equal, and is used +

Trait Implementations§

source§

impl Clone for Mode

source§

fn clone(&self) -> Mode

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 Mode

source§

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

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

impl<'de> Deserialize<'de> for Mode

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 Display for Mode

source§

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

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

impl PartialEq<Mode> for Mode

source§

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

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

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

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

impl Serialize for Mode

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<u8> for Mode

§

type Error = HpkeError

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

fn try_from(x: u8) -> Result<Mode, HpkeError>

Performs the conversion.
source§

impl Copy for Mode

source§

impl StructuralPartialEq for Mode

Auto Trait Implementations§

§

impl RefUnwindSafe for Mode

§

impl Send for Mode

§

impl Sync for Mode

§

impl Unpin for Mode

§

impl UnwindSafe for Mode

Blanket Implementations§

source§

impl<T> Any for Twhere +sufficient, and should not be overridden without very good reason.

source§

impl Serialize for Mode

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<u8> for Mode

§

type Error = HpkeError

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

fn try_from(x: u8) -> Result<Mode, HpkeError>

Performs the conversion.
source§

impl Copy for Mode

source§

impl StructuralPartialEq for Mode

Auto Trait Implementations§

§

impl RefUnwindSafe for Mode

§

impl Send for Mode

§

impl Sync for Mode

§

impl Unpin for Mode

§

impl UnwindSafe for Mode

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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.

diff --git a/hpke_rs/index.html b/hpke_rs/index.html index 6565b46..cfd171d 100644 --- a/hpke_rs/index.html +++ b/hpke_rs/index.html @@ -1,4 +1,4 @@ -hpke_rs - Rust

Crate hpke_rs

source ·
Expand description

HPKE

+hpke_rs - Rust

Crate hpke_rs

source ·
Expand description

HPKE

Build & Test crates.io Docs diff --git a/hpke_rs/prelude/trait.TryFrom.html b/hpke_rs/prelude/trait.TryFrom.html index 37cd800..93185a6 100644 --- a/hpke_rs/prelude/trait.TryFrom.html +++ b/hpke_rs/prelude/trait.TryFrom.html @@ -65,7 +65,7 @@

Examples

1.74.0 · source§

impl TryFrom<char> for u16

Maps a char with code point in U+0000..=U+FFFF to a u16 in 0x0000..=0xFFFF with same value, failing if the code point is greater than U+FFFF.

This corresponds to the UCS-2 encoding, as specified in ISO/IEC 10646:2003.

-
source§

impl TryFrom<i8> for u8

source§

impl TryFrom<i8> for u16

source§

impl TryFrom<i8> for u32

source§

impl TryFrom<i8> for u64

source§

impl TryFrom<i8> for u128

source§

impl TryFrom<i8> for usize

1.46.0 · source§

impl TryFrom<i8> for NonZeroI8

source§

impl TryFrom<i16> for i8

source§

impl TryFrom<i16> for u8

source§

impl TryFrom<i16> for u16

source§

impl TryFrom<i16> for u32

source§

impl TryFrom<i16> for u64

source§

impl TryFrom<i16> for u128

source§

impl TryFrom<i16> for usize

1.46.0 · source§

impl TryFrom<i16> for NonZeroI16

source§

impl TryFrom<i32> for i8

source§

impl TryFrom<i32> for i16

source§

impl TryFrom<i32> for isize

source§

impl TryFrom<i32> for u8

source§

impl TryFrom<i32> for u16

source§

impl TryFrom<i32> for u32

source§

impl TryFrom<i32> for u64

source§

impl TryFrom<i32> for u128

source§

impl TryFrom<i32> for usize

1.46.0 · source§

impl TryFrom<i32> for NonZeroI32

source§

impl TryFrom<i64> for i8

source§

impl TryFrom<i64> for i16

source§

impl TryFrom<i64> for i32

source§

impl TryFrom<i64> for isize

source§

impl TryFrom<i64> for u8

source§

impl TryFrom<i64> for u16

source§

impl TryFrom<i64> for u32

source§

impl TryFrom<i64> for u64

source§

impl TryFrom<i64> for u128

source§

impl TryFrom<i64> for usize

1.46.0 · source§

impl TryFrom<i64> for NonZeroI64

source§

impl TryFrom<i128> for i8

source§

impl TryFrom<i128> for i16

source§

impl TryFrom<i128> for i32

source§

impl TryFrom<i128> for i64

source§

impl TryFrom<i128> for isize

source§

impl TryFrom<i128> for u8

source§

impl TryFrom<i128> for u16

source§

impl TryFrom<i128> for u32

source§

impl TryFrom<i128> for u64

source§

impl TryFrom<i128> for u128

source§

impl TryFrom<i128> for usize

1.46.0 · source§

impl TryFrom<i128> for NonZeroI128

source§

impl TryFrom<isize> for i8

source§

impl TryFrom<isize> for i16

source§

impl TryFrom<isize> for i32

source§

impl TryFrom<isize> for i64

source§

impl TryFrom<isize> for i128

source§

impl TryFrom<isize> for u8

source§

impl TryFrom<isize> for u16

source§

impl TryFrom<isize> for u32

source§

impl TryFrom<isize> for u64

source§

impl TryFrom<isize> for u128

source§

impl TryFrom<isize> for usize

1.46.0 · source§

impl TryFrom<isize> for NonZeroIsize

source§

impl TryFrom<u8> for Mode

source§

impl TryFrom<u8> for i8

1.46.0 · source§

impl TryFrom<u8> for NonZeroU8

source§

impl TryFrom<u16> for i8

source§

impl TryFrom<u16> for i16

source§

impl TryFrom<u16> for isize

source§

impl TryFrom<u16> for u8

1.46.0 · source§

impl TryFrom<u16> for NonZeroU16

§

impl TryFrom<u16> for AeadAlgorithm

§

type Error = Error

§

impl TryFrom<u16> for KdfAlgorithm

§

type Error = Error

§

impl TryFrom<u16> for KemAlgorithm

§

type Error = Error

source§

impl TryFrom<u32> for char

source§

impl TryFrom<u32> for i8

source§

impl TryFrom<u32> for i16

source§

impl TryFrom<u32> for i32

source§

impl TryFrom<u32> for isize

source§

impl TryFrom<u32> for u8

source§

impl TryFrom<u32> for u16

source§

impl TryFrom<u32> for usize

1.46.0 · source§

impl TryFrom<u32> for NonZeroU32

source§

impl TryFrom<u64> for i8

source§

impl TryFrom<u64> for i16

source§

impl TryFrom<u64> for i32

source§

impl TryFrom<u64> for i64

source§

impl TryFrom<u64> for isize

source§

impl TryFrom<u64> for u8

source§

impl TryFrom<u64> for u16

source§

impl TryFrom<u64> for u32

source§

impl TryFrom<u64> for usize

1.46.0 · source§

impl TryFrom<u64> for NonZeroU64

source§

impl TryFrom<u128> for i8

source§

impl TryFrom<u128> for i16

source§

impl TryFrom<u128> for i32

source§

impl TryFrom<u128> for i64

source§

impl TryFrom<u128> for i128

source§

impl TryFrom<u128> for isize

source§

impl TryFrom<u128> for u8

source§

impl TryFrom<u128> for u16

source§

impl TryFrom<u128> for u32

source§

impl TryFrom<u128> for u64

source§

impl TryFrom<u128> for usize

1.46.0 · source§

impl TryFrom<u128> for NonZeroU128

source§

impl TryFrom<usize> for i8

source§

impl TryFrom<usize> for i16

source§

impl TryFrom<usize> for i32

source§

impl TryFrom<usize> for i64

source§

impl TryFrom<usize> for i128

source§

impl TryFrom<usize> for isize

source§

impl TryFrom<usize> for u8

source§

impl TryFrom<usize> for u16

source§

impl TryFrom<usize> for u32

source§

impl TryFrom<usize> for u64

source§

impl TryFrom<usize> for u128

1.46.0 · source§

impl TryFrom<usize> for NonZeroUsize

source§

impl TryFrom<usize> for Alignment

1.49.0 · source§

impl TryFrom<NonZeroI8> for NonZeroU8

1.49.0 · source§

impl TryFrom<NonZeroI8> for NonZeroU16

1.49.0 · source§

impl TryFrom<NonZeroI8> for NonZeroU32

1.49.0 · source§

impl TryFrom<NonZeroI8> for NonZeroU64

1.49.0 · source§

impl TryFrom<NonZeroI8> for NonZeroU128

1.49.0 · source§

impl TryFrom<NonZeroI8> for NonZeroUsize

1.49.0 · source§

impl TryFrom<NonZeroI16> for NonZeroI8

1.49.0 · source§

impl TryFrom<NonZeroI16> for NonZeroU8

1.49.0 · source§

impl TryFrom<NonZeroI16> for NonZeroU16

1.49.0 · source§

impl TryFrom<NonZeroI16> for NonZeroU32

1.49.0 · source§

impl TryFrom<NonZeroI16> for NonZeroU64

1.49.0 · source§

impl TryFrom<NonZeroI16> for NonZeroU128

1.49.0 · source§

impl TryFrom<NonZeroI16> for NonZeroUsize

1.49.0 · source§

impl TryFrom<NonZeroI32> for NonZeroI8

1.49.0 · source§

impl TryFrom<NonZeroI32> for NonZeroI16

1.49.0 · source§

impl TryFrom<NonZeroI32> for NonZeroIsize

1.49.0 · source§

impl TryFrom<NonZeroI32> for NonZeroU8

1.49.0 · source§

impl TryFrom<NonZeroI32> for NonZeroU16

1.49.0 · source§

impl TryFrom<NonZeroI32> for NonZeroU32

1.49.0 · source§

impl TryFrom<NonZeroI32> for NonZeroU64

1.49.0 · source§

impl TryFrom<NonZeroI32> for NonZeroU128

1.49.0 · source§

impl TryFrom<NonZeroI32> for NonZeroUsize

1.49.0 · source§

impl TryFrom<NonZeroI64> for NonZeroI8

1.49.0 · source§

impl TryFrom<NonZeroI64> for NonZeroI16

1.49.0 · source§

impl TryFrom<NonZeroI64> for NonZeroI32

1.49.0 · source§

impl TryFrom<NonZeroI64> for NonZeroIsize

1.49.0 · source§

impl TryFrom<NonZeroI64> for NonZeroU8

1.49.0 · source§

impl TryFrom<NonZeroI64> for NonZeroU16

1.49.0 · source§

impl TryFrom<NonZeroI64> for NonZeroU32

1.49.0 · source§

impl TryFrom<NonZeroI64> for NonZeroU64

1.49.0 · source§

impl TryFrom<NonZeroI64> for NonZeroU128

1.49.0 · source§

impl TryFrom<NonZeroI64> for NonZeroUsize

1.49.0 · source§

impl TryFrom<NonZeroI128> for NonZeroI8

1.49.0 · source§

impl TryFrom<NonZeroI128> for NonZeroI16

1.49.0 · source§

impl TryFrom<NonZeroI128> for NonZeroI32

1.49.0 · source§

impl TryFrom<NonZeroI128> for NonZeroI64

1.49.0 · source§

impl TryFrom<NonZeroI128> for NonZeroIsize

1.49.0 · source§

impl TryFrom<NonZeroI128> for NonZeroU8

1.49.0 · source§

impl TryFrom<NonZeroI128> for NonZeroU16

1.49.0 · source§

impl TryFrom<NonZeroI128> for NonZeroU32

1.49.0 · source§

impl TryFrom<NonZeroI128> for NonZeroU64

1.49.0 · source§

impl TryFrom<NonZeroI128> for NonZeroU128

1.49.0 · source§

impl TryFrom<NonZeroI128> for NonZeroUsize

1.49.0 · source§

impl TryFrom<NonZeroIsize> for NonZeroI8

1.49.0 · source§

impl TryFrom<NonZeroIsize> for NonZeroI16

1.49.0 · source§

impl TryFrom<NonZeroIsize> for NonZeroI32

1.49.0 · source§

impl TryFrom<NonZeroIsize> for NonZeroI64

1.49.0 · source§

impl TryFrom<NonZeroIsize> for NonZeroI128

1.49.0 · source§

impl TryFrom<NonZeroIsize> for NonZeroU8

1.49.0 · source§

impl TryFrom<NonZeroIsize> for NonZeroU16

1.49.0 · source§

impl TryFrom<NonZeroIsize> for NonZeroU32

1.49.0 · source§

impl TryFrom<NonZeroIsize> for NonZeroU64

1.49.0 · source§

impl TryFrom<NonZeroIsize> for NonZeroU128

1.49.0 · source§

impl TryFrom<NonZeroIsize> for NonZeroUsize

1.49.0 · source§

impl TryFrom<NonZeroU8> for NonZeroI8

1.49.0 · source§

impl TryFrom<NonZeroU16> for NonZeroI8

1.49.0 · source§

impl TryFrom<NonZeroU16> for NonZeroI16

1.49.0 · source§

impl TryFrom<NonZeroU16> for NonZeroIsize

1.49.0 · source§

impl TryFrom<NonZeroU16> for NonZeroU8

1.49.0 · source§

impl TryFrom<NonZeroU32> for NonZeroI8

1.49.0 · source§

impl TryFrom<NonZeroU32> for NonZeroI16

1.49.0 · source§

impl TryFrom<NonZeroU32> for NonZeroI32

1.49.0 · source§

impl TryFrom<NonZeroU32> for NonZeroIsize

1.49.0 · source§

impl TryFrom<NonZeroU32> for NonZeroU8

1.49.0 · source§

impl TryFrom<NonZeroU32> for NonZeroU16

1.49.0 · source§

impl TryFrom<NonZeroU32> for NonZeroUsize

1.49.0 · source§

impl TryFrom<NonZeroU64> for NonZeroI8

1.49.0 · source§

impl TryFrom<NonZeroU64> for NonZeroI16

1.49.0 · source§

impl TryFrom<NonZeroU64> for NonZeroI32

1.49.0 · source§

impl TryFrom<NonZeroU64> for NonZeroI64

1.49.0 · source§

impl TryFrom<NonZeroU64> for NonZeroIsize

1.49.0 · source§

impl TryFrom<NonZeroU64> for NonZeroU8

1.49.0 · source§

impl TryFrom<NonZeroU64> for NonZeroU16

1.49.0 · source§

impl TryFrom<NonZeroU64> for NonZeroU32

1.49.0 · source§

impl TryFrom<NonZeroU64> for NonZeroUsize

1.49.0 · source§

impl TryFrom<NonZeroU128> for NonZeroI8

1.49.0 · source§

impl TryFrom<NonZeroU128> for NonZeroI16

1.49.0 · source§

impl TryFrom<NonZeroU128> for NonZeroI32

1.49.0 · source§

impl TryFrom<NonZeroU128> for NonZeroI64

1.49.0 · source§

impl TryFrom<NonZeroU128> for NonZeroI128

1.49.0 · source§

impl TryFrom<NonZeroU128> for NonZeroIsize

1.49.0 · source§

impl TryFrom<NonZeroU128> for NonZeroU8

1.49.0 · source§

impl TryFrom<NonZeroU128> for NonZeroU16

1.49.0 · source§

impl TryFrom<NonZeroU128> for NonZeroU32

1.49.0 · source§

impl TryFrom<NonZeroU128> for NonZeroU64

1.49.0 · source§

impl TryFrom<NonZeroU128> for NonZeroUsize

1.49.0 · source§

impl TryFrom<NonZeroUsize> for NonZeroI8

1.49.0 · source§

impl TryFrom<NonZeroUsize> for NonZeroI16

1.49.0 · source§

impl TryFrom<NonZeroUsize> for NonZeroI32

1.49.0 · source§

impl TryFrom<NonZeroUsize> for NonZeroI64

1.49.0 · source§

impl TryFrom<NonZeroUsize> for NonZeroI128

1.49.0 · source§

impl TryFrom<NonZeroUsize> for NonZeroIsize

1.49.0 · source§

impl TryFrom<NonZeroUsize> for NonZeroU8

1.49.0 · source§

impl TryFrom<NonZeroUsize> for NonZeroU16

1.49.0 · source§

impl TryFrom<NonZeroUsize> for NonZeroU32

1.49.0 · source§

impl TryFrom<NonZeroUsize> for NonZeroU64

1.49.0 · source§

impl TryFrom<NonZeroUsize> for NonZeroU128

source§

impl TryFrom<NonZeroUsize> for Alignment

1.72.0 · source§

impl<'a> TryFrom<&'a OsStr> for &'a str

source§

impl<'a, T, const N: usize> TryFrom<&'a [T]> for &'a [T; N]

Tries to create an array ref &[T; N] from a slice ref &[T]. Succeeds if +

source§

impl TryFrom<i8> for u8

source§

impl TryFrom<i8> for u16

source§

impl TryFrom<i8> for u32

source§

impl TryFrom<i8> for u64

source§

impl TryFrom<i8> for u128

source§

impl TryFrom<i8> for usize

1.46.0 · source§

impl TryFrom<i8> for NonZeroI8

source§

impl TryFrom<i16> for i8

source§

impl TryFrom<i16> for u8

source§

impl TryFrom<i16> for u16

source§

impl TryFrom<i16> for u32

source§

impl TryFrom<i16> for u64

source§

impl TryFrom<i16> for u128

source§

impl TryFrom<i16> for usize

1.46.0 · source§

impl TryFrom<i16> for NonZeroI16

source§

impl TryFrom<i32> for i8

source§

impl TryFrom<i32> for i16

source§

impl TryFrom<i32> for isize

source§

impl TryFrom<i32> for u8

source§

impl TryFrom<i32> for u16

source§

impl TryFrom<i32> for u32

source§

impl TryFrom<i32> for u64

source§

impl TryFrom<i32> for u128

source§

impl TryFrom<i32> for usize

1.46.0 · source§

impl TryFrom<i32> for NonZeroI32

source§

impl TryFrom<i64> for i8

source§

impl TryFrom<i64> for i16

source§

impl TryFrom<i64> for i32

source§

impl TryFrom<i64> for isize

source§

impl TryFrom<i64> for u8

source§

impl TryFrom<i64> for u16

source§

impl TryFrom<i64> for u32

source§

impl TryFrom<i64> for u64

source§

impl TryFrom<i64> for u128

source§

impl TryFrom<i64> for usize

1.46.0 · source§

impl TryFrom<i64> for NonZeroI64

source§

impl TryFrom<i128> for i8

source§

impl TryFrom<i128> for i16

source§

impl TryFrom<i128> for i32

source§

impl TryFrom<i128> for i64

source§

impl TryFrom<i128> for isize

source§

impl TryFrom<i128> for u8

source§

impl TryFrom<i128> for u16

source§

impl TryFrom<i128> for u32

source§

impl TryFrom<i128> for u64

source§

impl TryFrom<i128> for u128

source§

impl TryFrom<i128> for usize

1.46.0 · source§

impl TryFrom<i128> for NonZeroI128

source§

impl TryFrom<isize> for i8

source§

impl TryFrom<isize> for i16

source§

impl TryFrom<isize> for i32

source§

impl TryFrom<isize> for i64

source§

impl TryFrom<isize> for i128

source§

impl TryFrom<isize> for u8

source§

impl TryFrom<isize> for u16

source§

impl TryFrom<isize> for u32

source§

impl TryFrom<isize> for u64

source§

impl TryFrom<isize> for u128

source§

impl TryFrom<isize> for usize

1.46.0 · source§

impl TryFrom<isize> for NonZeroIsize

source§

impl TryFrom<u8> for Mode

source§

impl TryFrom<u8> for i8

1.46.0 · source§

impl TryFrom<u8> for NonZeroU8

source§

impl TryFrom<u16> for i8

source§

impl TryFrom<u16> for i16

source§

impl TryFrom<u16> for isize

source§

impl TryFrom<u16> for u8

1.46.0 · source§

impl TryFrom<u16> for NonZeroU16

§

impl TryFrom<u16> for AeadAlgorithm

§

type Error = Error

§

impl TryFrom<u16> for KdfAlgorithm

§

type Error = Error

§

impl TryFrom<u16> for KemAlgorithm

§

type Error = Error

source§

impl TryFrom<u32> for char

source§

impl TryFrom<u32> for i8

source§

impl TryFrom<u32> for i16

source§

impl TryFrom<u32> for i32

source§

impl TryFrom<u32> for isize

source§

impl TryFrom<u32> for u8

source§

impl TryFrom<u32> for u16

source§

impl TryFrom<u32> for usize

1.46.0 · source§

impl TryFrom<u32> for NonZeroU32

source§

impl TryFrom<u64> for i8

source§

impl TryFrom<u64> for i16

source§

impl TryFrom<u64> for i32

source§

impl TryFrom<u64> for i64

source§

impl TryFrom<u64> for isize

source§

impl TryFrom<u64> for u8

source§

impl TryFrom<u64> for u16

source§

impl TryFrom<u64> for u32

source§

impl TryFrom<u64> for usize

1.46.0 · source§

impl TryFrom<u64> for NonZeroU64

source§

impl TryFrom<u128> for i8

source§

impl TryFrom<u128> for i16

source§

impl TryFrom<u128> for i32

source§

impl TryFrom<u128> for i64

source§

impl TryFrom<u128> for i128

source§

impl TryFrom<u128> for isize

source§

impl TryFrom<u128> for u8

source§

impl TryFrom<u128> for u16

source§

impl TryFrom<u128> for u32

source§

impl TryFrom<u128> for u64

source§

impl TryFrom<u128> for usize

1.46.0 · source§

impl TryFrom<u128> for NonZeroU128

source§

impl TryFrom<usize> for i8

source§

impl TryFrom<usize> for i16

source§

impl TryFrom<usize> for i32

source§

impl TryFrom<usize> for i64

source§

impl TryFrom<usize> for i128

source§

impl TryFrom<usize> for isize

source§

impl TryFrom<usize> for u8

source§

impl TryFrom<usize> for u16

source§

impl TryFrom<usize> for u32

source§

impl TryFrom<usize> for u64

source§

impl TryFrom<usize> for u128

1.46.0 · source§

impl TryFrom<usize> for NonZeroUsize

source§

impl TryFrom<usize> for Alignment

1.49.0 · source§

impl TryFrom<NonZeroI8> for NonZeroU8

1.49.0 · source§

impl TryFrom<NonZeroI8> for NonZeroU16

1.49.0 · source§

impl TryFrom<NonZeroI8> for NonZeroU32

1.49.0 · source§

impl TryFrom<NonZeroI8> for NonZeroU64

1.49.0 · source§

impl TryFrom<NonZeroI8> for NonZeroU128

1.49.0 · source§

impl TryFrom<NonZeroI8> for NonZeroUsize

1.49.0 · source§

impl TryFrom<NonZeroI16> for NonZeroI8

1.49.0 · source§

impl TryFrom<NonZeroI16> for NonZeroU8

1.49.0 · source§

impl TryFrom<NonZeroI16> for NonZeroU16

1.49.0 · source§

impl TryFrom<NonZeroI16> for NonZeroU32

1.49.0 · source§

impl TryFrom<NonZeroI16> for NonZeroU64

1.49.0 · source§

impl TryFrom<NonZeroI16> for NonZeroU128

1.49.0 · source§

impl TryFrom<NonZeroI16> for NonZeroUsize

1.49.0 · source§

impl TryFrom<NonZeroI32> for NonZeroI8

1.49.0 · source§

impl TryFrom<NonZeroI32> for NonZeroI16

1.49.0 · source§

impl TryFrom<NonZeroI32> for NonZeroIsize

1.49.0 · source§

impl TryFrom<NonZeroI32> for NonZeroU8

1.49.0 · source§

impl TryFrom<NonZeroI32> for NonZeroU16

1.49.0 · source§

impl TryFrom<NonZeroI32> for NonZeroU32

1.49.0 · source§

impl TryFrom<NonZeroI32> for NonZeroU64

1.49.0 · source§

impl TryFrom<NonZeroI32> for NonZeroU128

1.49.0 · source§

impl TryFrom<NonZeroI32> for NonZeroUsize

1.49.0 · source§

impl TryFrom<NonZeroI64> for NonZeroI8

1.49.0 · source§

impl TryFrom<NonZeroI64> for NonZeroI16

1.49.0 · source§

impl TryFrom<NonZeroI64> for NonZeroI32

1.49.0 · source§

impl TryFrom<NonZeroI64> for NonZeroIsize

1.49.0 · source§

impl TryFrom<NonZeroI64> for NonZeroU8

1.49.0 · source§

impl TryFrom<NonZeroI64> for NonZeroU16

1.49.0 · source§

impl TryFrom<NonZeroI64> for NonZeroU32

1.49.0 · source§

impl TryFrom<NonZeroI64> for NonZeroU64

1.49.0 · source§

impl TryFrom<NonZeroI64> for NonZeroU128

1.49.0 · source§

impl TryFrom<NonZeroI64> for NonZeroUsize

1.49.0 · source§

impl TryFrom<NonZeroI128> for NonZeroI8

1.49.0 · source§

impl TryFrom<NonZeroI128> for NonZeroI16

1.49.0 · source§

impl TryFrom<NonZeroI128> for NonZeroI32

1.49.0 · source§

impl TryFrom<NonZeroI128> for NonZeroI64

1.49.0 · source§

impl TryFrom<NonZeroI128> for NonZeroIsize

1.49.0 · source§

impl TryFrom<NonZeroI128> for NonZeroU8

1.49.0 · source§

impl TryFrom<NonZeroI128> for NonZeroU16

1.49.0 · source§

impl TryFrom<NonZeroI128> for NonZeroU32

1.49.0 · source§

impl TryFrom<NonZeroI128> for NonZeroU64

1.49.0 · source§

impl TryFrom<NonZeroI128> for NonZeroU128

1.49.0 · source§

impl TryFrom<NonZeroI128> for NonZeroUsize

1.49.0 · source§

impl TryFrom<NonZeroIsize> for NonZeroI8

1.49.0 · source§

impl TryFrom<NonZeroIsize> for NonZeroI16

1.49.0 · source§

impl TryFrom<NonZeroIsize> for NonZeroI32

1.49.0 · source§

impl TryFrom<NonZeroIsize> for NonZeroI64

1.49.0 · source§

impl TryFrom<NonZeroIsize> for NonZeroI128

1.49.0 · source§

impl TryFrom<NonZeroIsize> for NonZeroU8

1.49.0 · source§

impl TryFrom<NonZeroIsize> for NonZeroU16

1.49.0 · source§

impl TryFrom<NonZeroIsize> for NonZeroU32

1.49.0 · source§

impl TryFrom<NonZeroIsize> for NonZeroU64

1.49.0 · source§

impl TryFrom<NonZeroIsize> for NonZeroU128

1.49.0 · source§

impl TryFrom<NonZeroIsize> for NonZeroUsize

1.49.0 · source§

impl TryFrom<NonZeroU8> for NonZeroI8

1.49.0 · source§

impl TryFrom<NonZeroU16> for NonZeroI8

1.49.0 · source§

impl TryFrom<NonZeroU16> for NonZeroI16

1.49.0 · source§

impl TryFrom<NonZeroU16> for NonZeroIsize

1.49.0 · source§

impl TryFrom<NonZeroU16> for NonZeroU8

1.49.0 · source§

impl TryFrom<NonZeroU32> for NonZeroI8

1.49.0 · source§

impl TryFrom<NonZeroU32> for NonZeroI16

1.49.0 · source§

impl TryFrom<NonZeroU32> for NonZeroI32

1.49.0 · source§

impl TryFrom<NonZeroU32> for NonZeroIsize

1.49.0 · source§

impl TryFrom<NonZeroU32> for NonZeroU8

1.49.0 · source§

impl TryFrom<NonZeroU32> for NonZeroU16

1.49.0 · source§

impl TryFrom<NonZeroU32> for NonZeroUsize

1.49.0 · source§

impl TryFrom<NonZeroU64> for NonZeroI8

1.49.0 · source§

impl TryFrom<NonZeroU64> for NonZeroI16

1.49.0 · source§

impl TryFrom<NonZeroU64> for NonZeroI32

1.49.0 · source§

impl TryFrom<NonZeroU64> for NonZeroI64

1.49.0 · source§

impl TryFrom<NonZeroU64> for NonZeroIsize

1.49.0 · source§

impl TryFrom<NonZeroU64> for NonZeroU8

1.49.0 · source§

impl TryFrom<NonZeroU64> for NonZeroU16

1.49.0 · source§

impl TryFrom<NonZeroU64> for NonZeroU32

1.49.0 · source§

impl TryFrom<NonZeroU64> for NonZeroUsize

1.49.0 · source§

impl TryFrom<NonZeroU128> for NonZeroI8

1.49.0 · source§

impl TryFrom<NonZeroU128> for NonZeroI16

1.49.0 · source§

impl TryFrom<NonZeroU128> for NonZeroI32

1.49.0 · source§

impl TryFrom<NonZeroU128> for NonZeroI64

1.49.0 · source§

impl TryFrom<NonZeroU128> for NonZeroI128

1.49.0 · source§

impl TryFrom<NonZeroU128> for NonZeroIsize

1.49.0 · source§

impl TryFrom<NonZeroU128> for NonZeroU8

1.49.0 · source§

impl TryFrom<NonZeroU128> for NonZeroU16

1.49.0 · source§

impl TryFrom<NonZeroU128> for NonZeroU32

1.49.0 · source§

impl TryFrom<NonZeroU128> for NonZeroU64

1.49.0 · source§

impl TryFrom<NonZeroU128> for NonZeroUsize

1.49.0 · source§

impl TryFrom<NonZeroUsize> for NonZeroI8

1.49.0 · source§

impl TryFrom<NonZeroUsize> for NonZeroI16

1.49.0 · source§

impl TryFrom<NonZeroUsize> for NonZeroI32

1.49.0 · source§

impl TryFrom<NonZeroUsize> for NonZeroI64

1.49.0 · source§

impl TryFrom<NonZeroUsize> for NonZeroI128

1.49.0 · source§

impl TryFrom<NonZeroUsize> for NonZeroIsize

1.49.0 · source§

impl TryFrom<NonZeroUsize> for NonZeroU8

1.49.0 · source§

impl TryFrom<NonZeroUsize> for NonZeroU16

1.49.0 · source§

impl TryFrom<NonZeroUsize> for NonZeroU32

1.49.0 · source§

impl TryFrom<NonZeroUsize> for NonZeroU64

1.49.0 · source§

impl TryFrom<NonZeroUsize> for NonZeroU128

source§

impl TryFrom<NonZeroUsize> for Alignment

1.72.0 · source§

impl<'a> TryFrom<&'a OsStr> for &'a str

source§

impl<'a, T, const N: usize> TryFrom<&'a [T]> for &'a [T; N]

Tries to create an array ref &[T; N] from a slice ref &[T]. Succeeds if slice.len() == N.

let bytes: [u8; 3] = [1, 0, 2];
@@ -114,4 +114,4 @@ 

Examples

assert_eq!(512, u16::from_le_bytes(bytes_tail));
source§

impl<T, const N: usize> TryFrom<&mut [T]> for Simd<T, N>where LaneCount<N>: SupportedLaneCount, - T: SimdElement,

1.43.0 · source§

impl<T, const N: usize> TryFrom<Box<[T], Global>> for Box<[T; N], Global>

1.43.0 · source§

impl<T, const N: usize> TryFrom<Rc<[T], Global>> for Rc<[T; N], Global>

§

type Error = Rc<[T], Global>

1.66.0 · source§

impl<T, const N: usize> TryFrom<Vec<T, Global>> for Box<[T; N], Global>

§

type Error = Vec<T, Global>

\ No newline at end of file + T: SimdElement,
1.43.0 · source§

impl<T, const N: usize> TryFrom<Box<[T], Global>> for Box<[T; N], Global>

1.43.0 · source§

impl<T, const N: usize> TryFrom<Rc<[T], Global>> for Rc<[T; N], Global>

§

type Error = Rc<[T], Global>

1.66.0 · source§

impl<T, const N: usize> TryFrom<Vec<T, Global>> for Box<[T; N], Global>

§

type Error = Vec<T, Global>

\ No newline at end of file diff --git a/hpke_rs/struct.Context.html b/hpke_rs/struct.Context.html index ae6a0bb..0ff663e 100644 --- a/hpke_rs/struct.Context.html +++ b/hpke_rs/struct.Context.html @@ -1,7 +1,7 @@ -Context in hpke_rs - Rust

Struct hpke_rs::Context

source ·
pub struct Context<Crypto: 'static + HpkeCrypto> { /* private fields */ }
Expand description

The HPKE context. +Context in hpke_rs - Rust

Struct hpke_rs::Context

source ·
pub struct Context<Crypto: 'static + HpkeCrypto> { /* private fields */ }
Expand description

The HPKE context. Note that the RFC currently doesn’t define this. Also see https://github.com/cfrg/draft-irtf-cfrg-hpke/issues/161.

-

Implementations§

source§

impl<Crypto: HpkeCrypto> Context<Crypto>

source

pub fn seal( +

Implementations§

source§

impl<Crypto: HpkeCrypto> Context<Crypto>

source

pub fn seal( &mut self, aad: &[u8], plain_txt: &[u8] @@ -12,7 +12,7 @@ ct = Seal(self.key, self.ComputeNonce(self.seq), aad, pt) self.IncrementSeq() return ct -

source

pub fn open( +

source

pub fn open( &mut self, aad: &[u8], cipher_txt: &[u8] @@ -25,7 +25,7 @@ raise OpenError self.IncrementSeq() return pt -

source

pub fn export( +

source

pub fn export( &self, exporter_context: &[u8], length: usize @@ -34,10 +34,12 @@ output secret and returns an exporter secret as byte vector.

def Context.Export(exporter_context, L):
  return LabeledExpand(self.exporter_secret, "sec", exporter_context, L)
-

Trait Implementations§

source§

impl<Crypto: HpkeCrypto> Debug for Context<Crypto>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Crypto> RefUnwindSafe for Context<Crypto>

§

impl<Crypto> Send for Context<Crypto>where +

Trait Implementations§

source§

impl<Crypto: HpkeCrypto> Debug for Context<Crypto>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Crypto> RefUnwindSafe for Context<Crypto>where + <Crypto as HpkeCrypto>::HpkePrng: RefUnwindSafe,

§

impl<Crypto> Send for Context<Crypto>where <Crypto as HpkeCrypto>::HpkePrng: Send,

§

impl<Crypto> Sync for Context<Crypto>where - <Crypto as HpkeCrypto>::HpkePrng: Send + Sync,

§

impl<Crypto> Unpin for Context<Crypto>where - <Crypto as HpkeCrypto>::HpkePrng: Unpin,

§

impl<Crypto> UnwindSafe for Context<Crypto>

Blanket Implementations§

source§

impl<T> Any for Twhere + <Crypto as HpkeCrypto>::HpkePrng: Sync,

§

impl<Crypto> Unpin for Context<Crypto>where + <Crypto as HpkeCrypto>::HpkePrng: Unpin,

§

impl<Crypto> UnwindSafe for Context<Crypto>where + <Crypto as HpkeCrypto>::HpkePrng: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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.

diff --git a/hpke_rs/struct.Hpke.html b/hpke_rs/struct.Hpke.html index ad4ca8f..c0284af 100644 --- a/hpke_rs/struct.Hpke.html +++ b/hpke_rs/struct.Hpke.html @@ -1,18 +1,18 @@ -Hpke in hpke_rs - Rust

Struct hpke_rs::Hpke

source ·
pub struct Hpke<Crypto: 'static + HpkeCrypto> { /* private fields */ }
Expand description

The HPKE configuration struct. +Hpke in hpke_rs - Rust

Struct hpke_rs::Hpke

source ·
pub struct Hpke<Crypto: 'static + HpkeCrypto> { /* private fields */ }
Expand description

The HPKE configuration struct. This holds the configuration for HPKE but no state. To use HPKE first instantiate the configuration with let hpke = Hpke::new(mode, kem_mode, kdf_mode, aead_mode). Now one can use the hpke configuration.

Note that cloning does NOT clone the PRNG state.

-

Implementations§

source§

impl<Crypto: HpkeCrypto> Hpke<Crypto>

source

pub fn seed(&self, seed: &[u8]) -> Result<(), HpkeError>

Set PRNG state for testing.

-
source§

impl<Crypto: HpkeCrypto> Hpke<Crypto>

source

pub fn new( +

Implementations§

source§

impl<Crypto: HpkeCrypto> Hpke<Crypto>

source

pub fn seed(&mut self, seed: &[u8]) -> Result<(), HpkeError>

Set PRNG state for testing.

+
source§

impl<Crypto: HpkeCrypto> Hpke<Crypto>

source

pub fn new( mode: Mode, kem_id: KemAlgorithm, kdf_id: KdfAlgorithm, aead_id: AeadAlgorithm ) -> Self

Set up the configuration for HPKE.

-
source

pub fn setup_sender( - &self, +

source

pub fn setup_sender( + &mut self, pk_r: &HpkePublicKey, info: &[u8], psk: Option<&[u8]>, @@ -29,7 +29,7 @@ such that it doesn’t make sense to deserialize before passing it in.

The encapsulated secret is returned together with the context. If the secret key is missing in an authenticated mode, an error is returned.

-

source

pub fn setup_receiver( +

source

pub fn setup_receiver( &self, enc: &[u8], sk_r: &HpkePrivateKey, @@ -49,8 +49,8 @@

The context based on the decapsulated values and, if present, the PSK is returned. If the secret key is missing in an authenticated mode, an error is returned.

-

source

pub fn seal( - &self, +

source

pub fn seal( + &mut self, pk_r: &HpkePublicKey, info: &[u8], aad: &[u8], @@ -69,7 +69,7 @@ But the public keys will be present in encoded form rather than raw form such that it doesn’t make sense to deserialize before passing it in.

Returns the encapsulated secret and the ciphertext, or an error.

-

source

pub fn open( +

source

pub fn open( &self, enc: &[u8], sk_r: &HpkePrivateKey, @@ -89,8 +89,8 @@ But the public keys will be present in encoded form rather than raw form such that it doesn’t make sense to deserialize before passing it in.

Returns the decrypted plain text, or an error.

-

source

pub fn send_export( - &self, +

source

pub fn send_export( + &mut self, pk_r: &HpkePublicKey, info: &[u8], psk: Option<&[u8]>, @@ -110,7 +110,7 @@ such that it doesn’t make sense to deserialize before passing it in.

Returns the encapsulated secret and the exporter secret for the given exporter context and length.

-

source

pub fn receiver_export( +

source

pub fn receiver_export( &self, enc: &[u8], sk_r: &HpkePrivateKey, @@ -131,7 +131,7 @@ But the public keys will be present in encoded form rather than raw form such that it doesn’t make sense to deserialize before passing it in.

Returns the exporter secret for the given exporter context and length.

-

source

pub fn key_schedule( +

source

pub fn key_schedule( &self, shared_secret: &[u8], info: &[u8], @@ -139,20 +139,22 @@ psk_id: &[u8] ) -> Result<Context<Crypto>, HpkeError>

Creating the Encryption Context Generate the HPKE context from the given input.

-
source

pub fn generate_key_pair(&self) -> Result<HpkeKeyPair, HpkeError>

    +
source

pub fn generate_key_pair(&mut self) -> Result<HpkeKeyPair, HpkeError>

  1. Cryptographic Dependencies Randomized algorithm to generate a key pair (skX, pkX) for the KEM. This is equivalent to derive_key_pair(random_vector(sk.len()))

Returns an HpkeKeyPair.

-
source

pub fn derive_key_pair(&self, ikm: &[u8]) -> Result<HpkeKeyPair, HpkeError>

7.1.2. DeriveKeyPair +

source

pub fn derive_key_pair(&self, ikm: &[u8]) -> Result<HpkeKeyPair, HpkeError>

7.1.2. DeriveKeyPair Derive a key pair for the used KEM with the given input key material.

Returns an HpkeKeyPair result or an HpkeError if key derivation fails.

-

Trait Implementations§

source§

impl<Crypto: 'static + HpkeCrypto> Clone for Hpke<Crypto>

source§

fn clone(&self) -> Self

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<Crypto: Debug + 'static + HpkeCrypto> Debug for Hpke<Crypto>where - Crypto::HpkePrng: Debug,

source§

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

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

impl<Crypto: HpkeCrypto> Display for Hpke<Crypto>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Crypto> RefUnwindSafe for Hpke<Crypto>

§

impl<Crypto> Send for Hpke<Crypto>where +

Trait Implementations§

source§

impl<Crypto: 'static + HpkeCrypto> Clone for Hpke<Crypto>

source§

fn clone(&self) -> Self

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<Crypto: Debug + 'static + HpkeCrypto> Debug for Hpke<Crypto>where + Crypto::HpkePrng: Debug,

source§

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

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

impl<Crypto: HpkeCrypto> Display for Hpke<Crypto>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Crypto> RefUnwindSafe for Hpke<Crypto>where + <Crypto as HpkeCrypto>::HpkePrng: RefUnwindSafe,

§

impl<Crypto> Send for Hpke<Crypto>where <Crypto as HpkeCrypto>::HpkePrng: Send,

§

impl<Crypto> Sync for Hpke<Crypto>where - <Crypto as HpkeCrypto>::HpkePrng: Send + Sync,

§

impl<Crypto> Unpin for Hpke<Crypto>where - <Crypto as HpkeCrypto>::HpkePrng: Unpin,

§

impl<Crypto> UnwindSafe for Hpke<Crypto>

Blanket Implementations§

source§

impl<T> Any for Twhere + <Crypto as HpkeCrypto>::HpkePrng: Sync,

§

impl<Crypto> Unpin for Hpke<Crypto>where + <Crypto as HpkeCrypto>::HpkePrng: Unpin,

§

impl<Crypto> UnwindSafe for Hpke<Crypto>where + <Crypto as HpkeCrypto>::HpkePrng: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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.

diff --git a/hpke_rs/struct.HpkeKeyPair.html b/hpke_rs/struct.HpkeKeyPair.html index 9e562d8..a4eec4d 100644 --- a/hpke_rs/struct.HpkeKeyPair.html +++ b/hpke_rs/struct.HpkeKeyPair.html @@ -1,12 +1,12 @@ -HpkeKeyPair in hpke_rs - Rust

Struct hpke_rs::HpkeKeyPair

source ·
pub struct HpkeKeyPair { /* private fields */ }
Expand description

An HPKE key pair has an HPKE private and public key.

-

Implementations§

source§

impl HpkeKeyPair

source

pub fn new(sk: Vec<u8>, pk: Vec<u8>) -> Self

Create a new HPKE key pair. +HpkeKeyPair in hpke_rs - Rust

Struct hpke_rs::HpkeKeyPair

source ·
pub struct HpkeKeyPair { /* private fields */ }
Expand description

An HPKE key pair has an HPKE private and public key.

+

Implementations§

source§

impl HpkeKeyPair

source

pub fn new(sk: Vec<u8>, pk: Vec<u8>) -> Self

Create a new HPKE key pair. Consumes the private and public key bytes.

-
source

pub fn private_key(&self) -> &HpkePrivateKey

Get a reference to the HPKE private key of this key pair.

-
source

pub fn public_key(&self) -> &HpkePublicKey

Get a reference to the HPKE public key of this key pair.

-
source

pub fn into_keys(self) -> (HpkePrivateKey, HpkePublicKey)

Split the key pair into the two keys

-
source

pub fn from_keys(private_key: HpkePrivateKey, public_key: HpkePublicKey) -> Self

Build a key pair from two keys

-

Trait Implementations§

source§

impl Clone for HpkeKeyPair

source§

fn clone(&self) -> HpkeKeyPair

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 HpkeKeyPair

source§

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

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

impl Default for HpkeKeyPair

source§

fn default() -> HpkeKeyPair

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

impl<'de> Deserialize<'de> for HpkeKeyPair

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<(&[u8], &[u8])> for HpkeKeyPair

source§

fn from((sk, pk): (&[u8], &[u8])) -> Self

Converts to this type from the input type.
source§

impl From<(Vec<u8, Global>, Vec<u8, Global>)> for HpkeKeyPair

source§

fn from((sk, pk): (Vec<u8>, Vec<u8>)) -> Self

Converts to this type from the input type.
source§

impl Serialize for HpkeKeyPair

source§

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

source

pub fn private_key(&self) -> &HpkePrivateKey

Get a reference to the HPKE private key of this key pair.

+
source

pub fn public_key(&self) -> &HpkePublicKey

Get a reference to the HPKE public key of this key pair.

+
source

pub fn into_keys(self) -> (HpkePrivateKey, HpkePublicKey)

Split the key pair into the two keys

+
source

pub fn from_keys(private_key: HpkePrivateKey, public_key: HpkePublicKey) -> Self

Build a key pair from two keys

+

Trait Implementations§

source§

impl Clone for HpkeKeyPair

source§

fn clone(&self) -> HpkeKeyPair

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 HpkeKeyPair

source§

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

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

impl Default for HpkeKeyPair

source§

fn default() -> HpkeKeyPair

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

impl<'de> Deserialize<'de> for HpkeKeyPair

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<(&[u8], &[u8])> for HpkeKeyPair

source§

fn from((sk, pk): (&[u8], &[u8])) -> Self

Converts to this type from the input type.
source§

impl From<(Vec<u8, Global>, Vec<u8, Global>)> for HpkeKeyPair

source§

fn from((sk, pk): (Vec<u8>, Vec<u8>)) -> Self

Converts to this type from the input type.
source§

impl Serialize for HpkeKeyPair

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

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere diff --git a/hpke_rs/struct.HpkePrivateKey.html b/hpke_rs/struct.HpkePrivateKey.html index c599330..bdd81a5 100644 --- a/hpke_rs/struct.HpkePrivateKey.html +++ b/hpke_rs/struct.HpkePrivateKey.html @@ -1,14 +1,14 @@ -HpkePrivateKey in hpke_rs - Rust

Struct hpke_rs::HpkePrivateKey

source ·
pub struct HpkePrivateKey { /* private fields */ }
Expand description

An HPKE private key is a byte vector.

-

Implementations§

source§

impl HpkePrivateKey

source

pub fn new(b: Vec<u8>) -> Self

Create a new HPKE private key. +HpkePrivateKey in hpke_rs - Rust

Struct hpke_rs::HpkePrivateKey

source ·
pub struct HpkePrivateKey { /* private fields */ }
Expand description

An HPKE private key is a byte vector.

+

Implementations§

source§

impl HpkePrivateKey

source

pub fn new(b: Vec<u8>) -> Self

Create a new HPKE private key. Consumes the private key bytes.

-
source

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

Get the raw key as byte slice.

-

Trait Implementations§

source§

impl Clone for HpkePrivateKey

source§

fn clone(&self) -> HpkePrivateKey

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 HpkePrivateKey

source§

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

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

impl Default for HpkePrivateKey

source§

fn default() -> HpkePrivateKey

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

impl<'de> Deserialize<'de> for HpkePrivateKey

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<&[u8]> for HpkePrivateKey

source§

fn from(b: &[u8]) -> Self

Converts to this type from the input type.
source§

impl From<Vec<u8, Global>> for HpkePrivateKey

source§

fn from(b: Vec<u8>) -> Self

Converts to this type from the input type.
source§

impl PartialEq<HpkePrivateKey> for HpkePrivateKey

Hopefully constant time comparison of the two values as long as they have the +

source

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

Get the raw key as byte slice.

+

Trait Implementations§

source§

impl Clone for HpkePrivateKey

source§

fn clone(&self) -> HpkePrivateKey

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 HpkePrivateKey

source§

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

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

impl Default for HpkePrivateKey

source§

fn default() -> HpkePrivateKey

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

impl<'de> Deserialize<'de> for HpkePrivateKey

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<&[u8]> for HpkePrivateKey

source§

fn from(b: &[u8]) -> Self

Converts to this type from the input type.
source§

impl From<Vec<u8, Global>> for HpkePrivateKey

source§

fn from(b: Vec<u8>) -> Self

Converts to this type from the input type.
source§

impl PartialEq<HpkePrivateKey> for HpkePrivateKey

Hopefully constant time comparison of the two values as long as they have the same length.

-
source§

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

This method tests for self and other values to be equal, and is used +
source§

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

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

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

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

impl Serialize for HpkePrivateKey

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 Zeroize for HpkePrivateKey

source§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for HpkePrivateKey

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 Zeroize for HpkePrivateKey

source§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere diff --git a/hpke_rs/struct.HpkePublicKey.html b/hpke_rs/struct.HpkePublicKey.html index fac3457..d162776 100644 --- a/hpke_rs/struct.HpkePublicKey.html +++ b/hpke_rs/struct.HpkePublicKey.html @@ -1,20 +1,20 @@ -HpkePublicKey in hpke_rs - Rust

Struct hpke_rs::HpkePublicKey

source ·
pub struct HpkePublicKey { /* private fields */ }
Expand description

An HPKE public key is a byte vector.

-

Implementations§

source§

impl HpkePublicKey

source

pub fn new(value: Vec<u8>) -> Self

Create a new HPKE public key. +HpkePublicKey in hpke_rs - Rust

Struct hpke_rs::HpkePublicKey

source ·
pub struct HpkePublicKey { /* private fields */ }
Expand description

An HPKE public key is a byte vector.

+

Implementations§

source§

impl HpkePublicKey

source

pub fn new(value: Vec<u8>) -> Self

Create a new HPKE public key. Consumes the public key bytes.

-
source

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

Get the raw key as byte slice.

-

Trait Implementations§

source§

impl Clone for HpkePublicKey

source§

fn clone(&self) -> HpkePublicKey

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 HpkePublicKey

source§

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

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

impl Default for HpkePublicKey

source§

fn default() -> HpkePublicKey

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

impl<'de> Deserialize<'de> for HpkePublicKey

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 Deserialize for &HpkePublicKey

source§

fn tls_deserialize<R: Read>(_: &mut R) -> Result<Self, Error>

This function deserializes the bytes from the provided a std::io::Read -and returns the populated struct. Read more
§

fn tls_deserialize_exact(bytes: impl AsRef<[u8]>) -> Result<Self, Error>where - Self: Sized,

This function deserializes the provided bytes and returns the populated -struct. All bytes must be consumed. Read more
source§

impl Deserialize for HpkePublicKey

source§

fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>

This function deserializes the bytes from the provided a std::io::Read +
source

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

Get the raw key as byte slice.

+

Trait Implementations§

source§

impl Clone for HpkePublicKey

source§

fn clone(&self) -> HpkePublicKey

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 HpkePublicKey

source§

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

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

impl Default for HpkePublicKey

source§

fn default() -> HpkePublicKey

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

impl<'de> Deserialize<'de> for HpkePublicKey

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 Deserialize for &HpkePublicKey

source§

fn tls_deserialize<R: Read>(_: &mut R) -> Result<Self, Error>

This function deserializes the bytes from the provided a std::io::Read and returns the populated struct. Read more
§

fn tls_deserialize_exact(bytes: impl AsRef<[u8]>) -> Result<Self, Error>where Self: Sized,

This function deserializes the provided bytes and returns the populated -struct. All bytes must be consumed. Read more
source§

impl From<&[u8]> for HpkePublicKey

source§

fn from(b: &[u8]) -> Self

Converts to this type from the input type.
source§

impl From<Vec<u8, Global>> for HpkePublicKey

source§

fn from(b: Vec<u8>) -> Self

Converts to this type from the input type.
source§

impl PartialEq<HpkePublicKey> for HpkePublicKey

source§

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

This method tests for self and other values to be equal, and is used +struct. All bytes must be consumed. Read more
source§

impl Deserialize for HpkePublicKey

source§

fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>

This function deserializes the bytes from the provided a std::io::Read +and returns the populated struct. Read more
§

fn tls_deserialize_exact(bytes: impl AsRef<[u8]>) -> Result<Self, Error>where + Self: Sized,

This function deserializes the provided bytes and returns the populated +struct. All bytes must be consumed. Read more
source§

impl From<&[u8]> for HpkePublicKey

source§

fn from(b: &[u8]) -> Self

Converts to this type from the input type.
source§

impl From<Vec<u8, Global>> for HpkePublicKey

source§

fn from(b: Vec<u8>) -> Self

Converts to this type from the input type.
source§

impl PartialEq<HpkePublicKey> for HpkePublicKey

source§

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

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

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

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

impl Serialize for &HpkePublicKey

source§

fn tls_serialize<W: Write>(&self, writer: &mut W) -> Result<usize, Error>

Serialize self and write it to the writer. -The function returns the number of bytes written to writer.
§

fn tls_serialize_detached(&self) -> Result<Vec<u8, Global>, Error>

Serialize self and return it as a byte vector.
source§

impl Serialize for HpkePublicKey

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 Serialize for HpkePublicKey

source§

fn tls_serialize<W: Write>(&self, writer: &mut W) -> Result<usize, Error>

Serialize self and write it to the writer. -The function returns the number of bytes written to writer.
§

fn tls_serialize_detached(&self) -> Result<Vec<u8, Global>, Error>

Serialize self and return it as a byte vector.
source§

impl Size for &HpkePublicKey

source§

impl Size for HpkePublicKey

source§

impl StructuralPartialEq for HpkePublicKey

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere +sufficient, and should not be overridden without very good reason.

source§

impl Serialize for &HpkePublicKey

source§

fn tls_serialize<W: Write>(&self, writer: &mut W) -> Result<usize, Error>

Serialize self and write it to the writer. +The function returns the number of bytes written to writer.
§

fn tls_serialize_detached(&self) -> Result<Vec<u8, Global>, Error>

Serialize self and return it as a byte vector.
source§

impl Serialize for HpkePublicKey

source§

fn tls_serialize<W: Write>(&self, writer: &mut W) -> Result<usize, Error>

Serialize self and write it to the writer. +The function returns the number of bytes written to writer.
§

fn tls_serialize_detached(&self) -> Result<Vec<u8, Global>, Error>

Serialize self and return it as a byte vector.
source§

impl Serialize for HpkePublicKey

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 Size for &HpkePublicKey

source§

impl Size for HpkePublicKey

source§

impl StructuralPartialEq for HpkePublicKey

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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.

diff --git a/hpke_rs/test_util/fn.bytes_to_hex.html b/hpke_rs/test_util/fn.bytes_to_hex.html index c47028a..a04498e 100644 --- a/hpke_rs/test_util/fn.bytes_to_hex.html +++ b/hpke_rs/test_util/fn.bytes_to_hex.html @@ -1,2 +1,2 @@ -bytes_to_hex in hpke_rs::test_util - Rust
pub fn bytes_to_hex(bytes: &[u8]) -> String
Expand description

Convert bytes to a hex string.

+bytes_to_hex in hpke_rs::test_util - Rust
pub fn bytes_to_hex(bytes: &[u8]) -> String
Expand description

Convert bytes to a hex string.

\ No newline at end of file diff --git a/hpke_rs/test_util/fn.hex_to_bytes.html b/hpke_rs/test_util/fn.hex_to_bytes.html index 84e2f6e..9cc1035 100644 --- a/hpke_rs/test_util/fn.hex_to_bytes.html +++ b/hpke_rs/test_util/fn.hex_to_bytes.html @@ -1,2 +1,2 @@ -hex_to_bytes in hpke_rs::test_util - Rust
pub fn hex_to_bytes(hex: &str) -> Vec<u8>
Expand description

Convert a hex string to a byte vector.

+hex_to_bytes in hpke_rs::test_util - Rust
pub fn hex_to_bytes(hex: &str) -> Vec<u8>
Expand description

Convert a hex string to a byte vector.

\ No newline at end of file diff --git a/hpke_rs/test_util/fn.hex_to_bytes_option.html b/hpke_rs/test_util/fn.hex_to_bytes_option.html index 7240995..d0bf887 100644 --- a/hpke_rs/test_util/fn.hex_to_bytes_option.html +++ b/hpke_rs/test_util/fn.hex_to_bytes_option.html @@ -1,3 +1,3 @@ -hex_to_bytes_option in hpke_rs::test_util - Rust
pub fn hex_to_bytes_option(hex: Option<String>) -> Vec<u8>
Expand description

Convert a hex string to a byte vector. +hex_to_bytes_option in hpke_rs::test_util - Rust

pub fn hex_to_bytes_option(hex: Option<String>) -> Vec<u8>
Expand description

Convert a hex string to a byte vector. If the input is None, this returns an empty vector.

\ No newline at end of file diff --git a/hpke_rs/test_util/fn.vec_to_option_slice.html b/hpke_rs/test_util/fn.vec_to_option_slice.html index bb11c70..5ddbf28 100644 --- a/hpke_rs/test_util/fn.vec_to_option_slice.html +++ b/hpke_rs/test_util/fn.vec_to_option_slice.html @@ -1,3 +1,3 @@ -vec_to_option_slice in hpke_rs::test_util - Rust
pub fn vec_to_option_slice(v: &[u8]) -> Option<&[u8]>
Expand description

Convert a byte slice into byte slice option. +vec_to_option_slice in hpke_rs::test_util - Rust

pub fn vec_to_option_slice(v: &[u8]) -> Option<&[u8]>
Expand description

Convert a byte slice into byte slice option. Returns Nonce if the byte slice is empty and Some(v) otherwise.

\ No newline at end of file diff --git a/hpke_rs/test_util/index.html b/hpke_rs/test_util/index.html index 301a0d6..c48a151 100644 --- a/hpke_rs/test_util/index.html +++ b/hpke_rs/test_util/index.html @@ -1,4 +1,4 @@ -hpke_rs::test_util - Rust

Module hpke_rs::test_util

source ·
Expand description

Test util module. Should be moved really.

+hpke_rs::test_util - Rust

Module hpke_rs::test_util

source ·
Expand description

Test util module. Should be moved really.

Functions

  • Convert bytes to a hex string.
  • Convert a hex string to a byte vector.
  • Convert a hex string to a byte vector. If the input is None, this returns an empty vector.
  • Convert a byte slice into byte slice option. Returns Nonce if the byte slice is empty and Some(v) otherwise.
\ No newline at end of file diff --git a/hpke_rs/type.HPKEKeyPair.html b/hpke_rs/type.HPKEKeyPair.html index 9a9f9de..e10b94e 100644 --- a/hpke_rs/type.HPKEKeyPair.html +++ b/hpke_rs/type.HPKEKeyPair.html @@ -1,9 +1,9 @@ -HPKEKeyPair in hpke_rs - Rust

Type Alias hpke_rs::HPKEKeyPair

source ·
pub type HPKEKeyPair = HpkeKeyPair;
👎Deprecated since 0.0.7: Please use HpkeKeyPair instead. This alias will be removed with the first stable 0.1 release.

Aliased Type§

struct HPKEKeyPair { /* private fields */ }

Implementations§

source§

impl HpkeKeyPair

source

pub fn new(sk: Vec<u8>, pk: Vec<u8>) -> Self

Create a new HPKE key pair. +HPKEKeyPair in hpke_rs - Rust

Type Alias hpke_rs::HPKEKeyPair

source ·
pub type HPKEKeyPair = HpkeKeyPair;
👎Deprecated since 0.0.7: Please use HpkeKeyPair instead. This alias will be removed with the first stable 0.1 release.

Aliased Type§

struct HPKEKeyPair { /* private fields */ }

Implementations§

source§

impl HpkeKeyPair

source

pub fn new(sk: Vec<u8>, pk: Vec<u8>) -> Self

Create a new HPKE key pair. Consumes the private and public key bytes.

-
source

pub fn private_key(&self) -> &HpkePrivateKey

Get a reference to the HPKE private key of this key pair.

-
source

pub fn public_key(&self) -> &HpkePublicKey

Get a reference to the HPKE public key of this key pair.

-
source

pub fn into_keys(self) -> (HpkePrivateKey, HpkePublicKey)

Split the key pair into the two keys

-
source

pub fn from_keys(private_key: HpkePrivateKey, public_key: HpkePublicKey) -> Self

Build a key pair from two keys

-

Trait Implementations§

source§

impl Clone for HpkeKeyPair

source§

fn clone(&self) -> HpkeKeyPair

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 HpkeKeyPair

source§

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

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

impl Default for HpkeKeyPair

source§

fn default() -> HpkeKeyPair

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

impl<'de> Deserialize<'de> for HpkeKeyPair

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<(&[u8], &[u8])> for HpkeKeyPair

source§

fn from((sk, pk): (&[u8], &[u8])) -> Self

Converts to this type from the input type.
source§

impl From<(Vec<u8, Global>, Vec<u8, Global>)> for HpkeKeyPair

source§

fn from((sk, pk): (Vec<u8>, Vec<u8>)) -> Self

Converts to this type from the input type.
source§

impl Serialize for HpkeKeyPair

source§

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

source

pub fn private_key(&self) -> &HpkePrivateKey

Get a reference to the HPKE private key of this key pair.

+
source

pub fn public_key(&self) -> &HpkePublicKey

Get a reference to the HPKE public key of this key pair.

+
source

pub fn into_keys(self) -> (HpkePrivateKey, HpkePublicKey)

Split the key pair into the two keys

+
source

pub fn from_keys(private_key: HpkePrivateKey, public_key: HpkePublicKey) -> Self

Build a key pair from two keys

+

Trait Implementations§

source§

impl Clone for HpkeKeyPair

source§

fn clone(&self) -> HpkeKeyPair

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 HpkeKeyPair

source§

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

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

impl Default for HpkeKeyPair

source§

fn default() -> HpkeKeyPair

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

impl<'de> Deserialize<'de> for HpkeKeyPair

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<(&[u8], &[u8])> for HpkeKeyPair

source§

fn from((sk, pk): (&[u8], &[u8])) -> Self

Converts to this type from the input type.
source§

impl From<(Vec<u8, Global>, Vec<u8, Global>)> for HpkeKeyPair

source§

fn from((sk, pk): (Vec<u8>, Vec<u8>)) -> Self

Converts to this type from the input type.
source§

impl Serialize for HpkeKeyPair

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
\ No newline at end of file diff --git a/hpke_rs/type.HPKEPrivateKey.html b/hpke_rs/type.HPKEPrivateKey.html index 44660f2..c21fe66 100644 --- a/hpke_rs/type.HPKEPrivateKey.html +++ b/hpke_rs/type.HPKEPrivateKey.html @@ -1,11 +1,11 @@ -HPKEPrivateKey in hpke_rs - Rust

Type Alias hpke_rs::HPKEPrivateKey

source ·
pub type HPKEPrivateKey = HpkePrivateKey;
👎Deprecated since 0.0.7: Please use HpkePrivateKey instead. This alias will be removed with the first stable 0.1 release.

Aliased Type§

struct HPKEPrivateKey { /* private fields */ }

Implementations§

source§

impl HpkePrivateKey

source

pub fn new(b: Vec<u8>) -> Self

Create a new HPKE private key. +HPKEPrivateKey in hpke_rs - Rust

Type Alias hpke_rs::HPKEPrivateKey

source ·
pub type HPKEPrivateKey = HpkePrivateKey;
👎Deprecated since 0.0.7: Please use HpkePrivateKey instead. This alias will be removed with the first stable 0.1 release.

Aliased Type§

struct HPKEPrivateKey { /* private fields */ }

Implementations§

source§

impl HpkePrivateKey

source

pub fn new(b: Vec<u8>) -> Self

Create a new HPKE private key. Consumes the private key bytes.

-
source

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

Get the raw key as byte slice.

-

Trait Implementations§

source§

impl Clone for HpkePrivateKey

source§

fn clone(&self) -> HpkePrivateKey

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 HpkePrivateKey

source§

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

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

impl Default for HpkePrivateKey

source§

fn default() -> HpkePrivateKey

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

impl<'de> Deserialize<'de> for HpkePrivateKey

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<&[u8]> for HpkePrivateKey

source§

fn from(b: &[u8]) -> Self

Converts to this type from the input type.
source§

impl From<Vec<u8, Global>> for HpkePrivateKey

source§

fn from(b: Vec<u8>) -> Self

Converts to this type from the input type.
source§

impl PartialEq<HpkePrivateKey> for HpkePrivateKey

Hopefully constant time comparison of the two values as long as they have the +

source

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

Get the raw key as byte slice.

+

Trait Implementations§

source§

impl Clone for HpkePrivateKey

source§

fn clone(&self) -> HpkePrivateKey

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 HpkePrivateKey

source§

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

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

impl Default for HpkePrivateKey

source§

fn default() -> HpkePrivateKey

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

impl<'de> Deserialize<'de> for HpkePrivateKey

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<&[u8]> for HpkePrivateKey

source§

fn from(b: &[u8]) -> Self

Converts to this type from the input type.
source§

impl From<Vec<u8, Global>> for HpkePrivateKey

source§

fn from(b: Vec<u8>) -> Self

Converts to this type from the input type.
source§

impl PartialEq<HpkePrivateKey> for HpkePrivateKey

Hopefully constant time comparison of the two values as long as they have the same length.

-
source§

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

This method tests for self and other values to be equal, and is used +
source§

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

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

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

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

impl Serialize for HpkePrivateKey

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 Zeroize for HpkePrivateKey

source§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for HpkePrivateKey

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 Zeroize for HpkePrivateKey

source§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler.
\ No newline at end of file diff --git a/hpke_rs/type.HPKEPublicKey.html b/hpke_rs/type.HPKEPublicKey.html index 44dc41a..81d662f 100644 --- a/hpke_rs/type.HPKEPublicKey.html +++ b/hpke_rs/type.HPKEPublicKey.html @@ -1,12 +1,12 @@ -HPKEPublicKey in hpke_rs - Rust

Type Alias hpke_rs::HPKEPublicKey

source ·
pub type HPKEPublicKey = HpkePublicKey;
👎Deprecated since 0.0.7: Please use HpkePublicKey instead. This alias will be removed with the first stable 0.1 release.

Aliased Type§

struct HPKEPublicKey { /* private fields */ }

Implementations§

source§

impl HpkePublicKey

source

pub fn new(value: Vec<u8>) -> Self

Create a new HPKE public key. +HPKEPublicKey in hpke_rs - Rust

Type Alias hpke_rs::HPKEPublicKey

source ·
pub type HPKEPublicKey = HpkePublicKey;
👎Deprecated since 0.0.7: Please use HpkePublicKey instead. This alias will be removed with the first stable 0.1 release.

Aliased Type§

struct HPKEPublicKey { /* private fields */ }

Implementations§

source§

impl HpkePublicKey

source

pub fn new(value: Vec<u8>) -> Self

Create a new HPKE public key. Consumes the public key bytes.

-
source

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

Get the raw key as byte slice.

-

Trait Implementations§

source§

impl Clone for HpkePublicKey

source§

fn clone(&self) -> HpkePublicKey

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 HpkePublicKey

source§

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

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

impl Default for HpkePublicKey

source§

fn default() -> HpkePublicKey

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

impl<'de> Deserialize<'de> for HpkePublicKey

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 Deserialize for HpkePublicKey

source§

fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>

This function deserializes the bytes from the provided a std::io::Read +
source

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

Get the raw key as byte slice.

+

Trait Implementations§

source§

impl Clone for HpkePublicKey

source§

fn clone(&self) -> HpkePublicKey

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 HpkePublicKey

source§

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

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

impl Default for HpkePublicKey

source§

fn default() -> HpkePublicKey

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

impl<'de> Deserialize<'de> for HpkePublicKey

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 Deserialize for HpkePublicKey

source§

fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>

This function deserializes the bytes from the provided a std::io::Read and returns the populated struct. Read more
§

fn tls_deserialize_exact(bytes: impl AsRef<[u8]>) -> Result<Self, Error>where Self: Sized,

This function deserializes the provided bytes and returns the populated -struct. All bytes must be consumed. Read more
source§

impl From<&[u8]> for HpkePublicKey

source§

fn from(b: &[u8]) -> Self

Converts to this type from the input type.
source§

impl From<Vec<u8, Global>> for HpkePublicKey

source§

fn from(b: Vec<u8>) -> Self

Converts to this type from the input type.
source§

impl PartialEq<HpkePublicKey> for HpkePublicKey

source§

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

This method tests for self and other values to be equal, and is used +struct. All bytes must be consumed. Read more
source§

impl From<&[u8]> for HpkePublicKey

source§

fn from(b: &[u8]) -> Self

Converts to this type from the input type.
source§

impl From<Vec<u8, Global>> for HpkePublicKey

source§

fn from(b: Vec<u8>) -> Self

Converts to this type from the input type.
source§

impl PartialEq<HpkePublicKey> for HpkePublicKey

source§

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

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

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

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

impl Serialize for HpkePublicKey

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 Serialize for HpkePublicKey

source§

fn tls_serialize<W: Write>(&self, writer: &mut W) -> Result<usize, Error>

Serialize self and write it to the writer. -The function returns the number of bytes written to writer.
§

fn tls_serialize_detached(&self) -> Result<Vec<u8, Global>, Error>

Serialize self and return it as a byte vector.
source§

impl Size for HpkePublicKey

source§

impl StructuralPartialEq for HpkePublicKey

\ No newline at end of file +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for HpkePublicKey

source§

fn tls_serialize<W: Write>(&self, writer: &mut W) -> Result<usize, Error>

Serialize self and write it to the writer. +The function returns the number of bytes written to writer.
§

fn tls_serialize_detached(&self) -> Result<Vec<u8, Global>, Error>

Serialize self and return it as a byte vector.
source§

impl Serialize for HpkePublicKey

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 Size for HpkePublicKey

source§

impl StructuralPartialEq for HpkePublicKey

\ No newline at end of file diff --git a/implementors/core/clone/trait.Clone.js b/implementors/core/clone/trait.Clone.js index 29c3d7e..c7012c5 100644 --- a/implementors/core/clone/trait.Clone.js +++ b/implementors/core/clone/trait.Clone.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"hpke_rs":[["impl Clone for HpkePrivateKey"],["impl<Crypto: 'static + HpkeCrypto> Clone for Hpke<Crypto>"],["impl Clone for HpkeKeyPair"],["impl Clone for HpkeError"],["impl Clone for Mode"],["impl Clone for HpkePublicKey"]] +"hpke_rs":[["impl Clone for HpkePublicKey"],["impl Clone for Mode"],["impl Clone for HpkePrivateKey"],["impl<Crypto: 'static + HpkeCrypto> Clone for Hpke<Crypto>"],["impl Clone for HpkeError"],["impl Clone for HpkeKeyPair"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/cmp/trait.PartialEq.js b/implementors/core/cmp/trait.PartialEq.js index 5f936b7..57abae6 100644 --- a/implementors/core/cmp/trait.PartialEq.js +++ b/implementors/core/cmp/trait.PartialEq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"hpke_rs":[["impl PartialEq<HpkePrivateKey> for HpkePrivateKey"],["impl PartialEq<HpkePublicKey> for HpkePublicKey"],["impl PartialEq<HpkeError> for HpkeError"],["impl PartialEq<Mode> for Mode"]] +"hpke_rs":[["impl PartialEq<HpkeError> for HpkeError"],["impl PartialEq<HpkePublicKey> for HpkePublicKey"],["impl PartialEq<HpkePrivateKey> for HpkePrivateKey"],["impl PartialEq<Mode> for Mode"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/convert/trait.From.js b/implementors/core/convert/trait.From.js index 135811f..f37b9ac 100644 --- a/implementors/core/convert/trait.From.js +++ b/implementors/core/convert/trait.From.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"hpke_rs":[["impl From<Error> for HpkeError"],["impl From<Vec<u8, Global>> for HpkePublicKey"],["impl From<(Vec<u8, Global>, Vec<u8, Global>)> for HpkeKeyPair"],["impl From<Vec<u8, Global>> for HpkePrivateKey"],["impl From<&[u8]> for HpkePublicKey"],["impl From<(&[u8], &[u8])> for HpkeKeyPair"],["impl From<&[u8]> for HpkePrivateKey"]] +"hpke_rs":[["impl From<Vec<u8, Global>> for HpkePublicKey"],["impl From<&[u8]> for HpkePrivateKey"],["impl From<(Vec<u8, Global>, Vec<u8, Global>)> for HpkeKeyPair"],["impl From<&[u8]> for HpkePublicKey"],["impl From<Vec<u8, Global>> for HpkePrivateKey"],["impl From<Error> for HpkeError"],["impl From<(&[u8], &[u8])> for HpkeKeyPair"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/default/trait.Default.js b/implementors/core/default/trait.Default.js index b470006..af577a2 100644 --- a/implementors/core/default/trait.Default.js +++ b/implementors/core/default/trait.Default.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"hpke_rs":[["impl Default for HpkeKeyPair"],["impl Default for HpkePublicKey"],["impl Default for HpkePrivateKey"]] +"hpke_rs":[["impl Default for HpkeKeyPair"],["impl Default for HpkePrivateKey"],["impl Default for HpkePublicKey"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/fmt/trait.Debug.js b/implementors/core/fmt/trait.Debug.js index 825f35c..005952f 100644 --- a/implementors/core/fmt/trait.Debug.js +++ b/implementors/core/fmt/trait.Debug.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"hpke_rs":[["impl<Crypto: Debug + 'static + HpkeCrypto> Debug for Hpke<Crypto>where\n Crypto::HpkePrng: Debug,"],["impl Debug for HpkeError"],["impl<Crypto: HpkeCrypto> Debug for Context<Crypto>"],["impl Debug for HpkePrivateKey"],["impl Debug for Mode"],["impl Debug for HpkeKeyPair"],["impl Debug for HpkePublicKey"]] +"hpke_rs":[["impl Debug for HpkePublicKey"],["impl Debug for HpkePrivateKey"],["impl Debug for HpkeKeyPair"],["impl Debug for HpkeError"],["impl<Crypto: Debug + 'static + HpkeCrypto> Debug for Hpke<Crypto>where\n Crypto::HpkePrng: Debug,"],["impl Debug for Mode"],["impl<Crypto: HpkeCrypto> Debug for Context<Crypto>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Freeze.js b/implementors/core/marker/trait.Freeze.js index 0625333..6df983d 100644 --- a/implementors/core/marker/trait.Freeze.js +++ b/implementors/core/marker/trait.Freeze.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"hpke_rs":[["impl Freeze for HpkeError",1,["hpke_rs::HpkeError"]],["impl Freeze for HpkePublicKey",1,["hpke_rs::HpkePublicKey"]],["impl Freeze for HpkePrivateKey",1,["hpke_rs::HpkePrivateKey"]],["impl Freeze for HpkeKeyPair",1,["hpke_rs::HpkeKeyPair"]],["impl Freeze for Mode",1,["hpke_rs::Mode"]],["impl<Crypto> !Freeze for Context<Crypto>",1,["hpke_rs::Context"]],["impl<Crypto> !Freeze for Hpke<Crypto>",1,["hpke_rs::Hpke"]]] +"hpke_rs":[["impl Freeze for HpkeError",1,["hpke_rs::HpkeError"]],["impl Freeze for HpkePublicKey",1,["hpke_rs::HpkePublicKey"]],["impl Freeze for HpkePrivateKey",1,["hpke_rs::HpkePrivateKey"]],["impl Freeze for HpkeKeyPair",1,["hpke_rs::HpkeKeyPair"]],["impl Freeze for Mode",1,["hpke_rs::Mode"]],["impl<Crypto> Freeze for Context<Crypto>where\n <Crypto as HpkeCrypto>::HpkePrng: Freeze,",1,["hpke_rs::Context"]],["impl<Crypto> Freeze for Hpke<Crypto>where\n <Crypto as HpkeCrypto>::HpkePrng: Freeze,",1,["hpke_rs::Hpke"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.StructuralPartialEq.js b/implementors/core/marker/trait.StructuralPartialEq.js index 9ad52ad..5e93391 100644 --- a/implementors/core/marker/trait.StructuralPartialEq.js +++ b/implementors/core/marker/trait.StructuralPartialEq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"hpke_rs":[["impl StructuralPartialEq for HpkeError"],["impl StructuralPartialEq for HpkePublicKey"],["impl StructuralPartialEq for Mode"]] +"hpke_rs":[["impl StructuralPartialEq for HpkePublicKey"],["impl StructuralPartialEq for Mode"],["impl StructuralPartialEq for HpkeError"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Sync.js b/implementors/core/marker/trait.Sync.js index 6ff5d31..499ecde 100644 --- a/implementors/core/marker/trait.Sync.js +++ b/implementors/core/marker/trait.Sync.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"hpke_rs":[["impl Sync for HpkeError",1,["hpke_rs::HpkeError"]],["impl Sync for HpkePublicKey",1,["hpke_rs::HpkePublicKey"]],["impl Sync for HpkePrivateKey",1,["hpke_rs::HpkePrivateKey"]],["impl Sync for HpkeKeyPair",1,["hpke_rs::HpkeKeyPair"]],["impl Sync for Mode",1,["hpke_rs::Mode"]],["impl<Crypto> Sync for Context<Crypto>where\n <Crypto as HpkeCrypto>::HpkePrng: Send + Sync,",1,["hpke_rs::Context"]],["impl<Crypto> Sync for Hpke<Crypto>where\n <Crypto as HpkeCrypto>::HpkePrng: Send + Sync,",1,["hpke_rs::Hpke"]]] +"hpke_rs":[["impl Sync for HpkeError",1,["hpke_rs::HpkeError"]],["impl Sync for HpkePublicKey",1,["hpke_rs::HpkePublicKey"]],["impl Sync for HpkePrivateKey",1,["hpke_rs::HpkePrivateKey"]],["impl Sync for HpkeKeyPair",1,["hpke_rs::HpkeKeyPair"]],["impl Sync for Mode",1,["hpke_rs::Mode"]],["impl<Crypto> Sync for Context<Crypto>where\n <Crypto as HpkeCrypto>::HpkePrng: Sync,",1,["hpke_rs::Context"]],["impl<Crypto> Sync for Hpke<Crypto>where\n <Crypto as HpkeCrypto>::HpkePrng: Sync,",1,["hpke_rs::Hpke"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js b/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js index 9d20887..5bd8bb3 100644 --- a/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ b/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"hpke_rs":[["impl RefUnwindSafe for HpkeError",1,["hpke_rs::HpkeError"]],["impl RefUnwindSafe for HpkePublicKey",1,["hpke_rs::HpkePublicKey"]],["impl RefUnwindSafe for HpkePrivateKey",1,["hpke_rs::HpkePrivateKey"]],["impl RefUnwindSafe for HpkeKeyPair",1,["hpke_rs::HpkeKeyPair"]],["impl RefUnwindSafe for Mode",1,["hpke_rs::Mode"]],["impl<Crypto> RefUnwindSafe for Context<Crypto>",1,["hpke_rs::Context"]],["impl<Crypto> RefUnwindSafe for Hpke<Crypto>",1,["hpke_rs::Hpke"]]] +"hpke_rs":[["impl RefUnwindSafe for HpkeError",1,["hpke_rs::HpkeError"]],["impl RefUnwindSafe for HpkePublicKey",1,["hpke_rs::HpkePublicKey"]],["impl RefUnwindSafe for HpkePrivateKey",1,["hpke_rs::HpkePrivateKey"]],["impl RefUnwindSafe for HpkeKeyPair",1,["hpke_rs::HpkeKeyPair"]],["impl RefUnwindSafe for Mode",1,["hpke_rs::Mode"]],["impl<Crypto> RefUnwindSafe for Context<Crypto>where\n <Crypto as HpkeCrypto>::HpkePrng: RefUnwindSafe,",1,["hpke_rs::Context"]],["impl<Crypto> RefUnwindSafe for Hpke<Crypto>where\n <Crypto as HpkeCrypto>::HpkePrng: RefUnwindSafe,",1,["hpke_rs::Hpke"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/panic/unwind_safe/trait.UnwindSafe.js b/implementors/core/panic/unwind_safe/trait.UnwindSafe.js index 79979b4..633c214 100644 --- a/implementors/core/panic/unwind_safe/trait.UnwindSafe.js +++ b/implementors/core/panic/unwind_safe/trait.UnwindSafe.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"hpke_rs":[["impl UnwindSafe for HpkeError",1,["hpke_rs::HpkeError"]],["impl UnwindSafe for HpkePublicKey",1,["hpke_rs::HpkePublicKey"]],["impl UnwindSafe for HpkePrivateKey",1,["hpke_rs::HpkePrivateKey"]],["impl UnwindSafe for HpkeKeyPair",1,["hpke_rs::HpkeKeyPair"]],["impl UnwindSafe for Mode",1,["hpke_rs::Mode"]],["impl<Crypto> UnwindSafe for Context<Crypto>",1,["hpke_rs::Context"]],["impl<Crypto> UnwindSafe for Hpke<Crypto>",1,["hpke_rs::Hpke"]]] +"hpke_rs":[["impl UnwindSafe for HpkeError",1,["hpke_rs::HpkeError"]],["impl UnwindSafe for HpkePublicKey",1,["hpke_rs::HpkePublicKey"]],["impl UnwindSafe for HpkePrivateKey",1,["hpke_rs::HpkePrivateKey"]],["impl UnwindSafe for HpkeKeyPair",1,["hpke_rs::HpkeKeyPair"]],["impl UnwindSafe for Mode",1,["hpke_rs::Mode"]],["impl<Crypto> UnwindSafe for Context<Crypto>where\n <Crypto as HpkeCrypto>::HpkePrng: UnwindSafe,",1,["hpke_rs::Context"]],["impl<Crypto> UnwindSafe for Hpke<Crypto>where\n <Crypto as HpkeCrypto>::HpkePrng: UnwindSafe,",1,["hpke_rs::Hpke"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/serde/de/trait.Deserialize.js b/implementors/serde/de/trait.Deserialize.js index d9a25b3..00387dc 100644 --- a/implementors/serde/de/trait.Deserialize.js +++ b/implementors/serde/de/trait.Deserialize.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"hpke_rs":[["impl<'de> Deserialize<'de> for HpkePublicKey"],["impl<'de> Deserialize<'de> for HpkePrivateKey"],["impl<'de> Deserialize<'de> for Mode"],["impl<'de> Deserialize<'de> for HpkeKeyPair"]] +"hpke_rs":[["impl<'de> Deserialize<'de> for HpkeKeyPair"],["impl<'de> Deserialize<'de> for Mode"],["impl<'de> Deserialize<'de> for HpkePublicKey"],["impl<'de> Deserialize<'de> for HpkePrivateKey"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/serde/ser/trait.Serialize.js b/implementors/serde/ser/trait.Serialize.js index 81bb575..19adfce 100644 --- a/implementors/serde/ser/trait.Serialize.js +++ b/implementors/serde/ser/trait.Serialize.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"hpke_rs":[["impl Serialize for Mode"],["impl Serialize for HpkePublicKey"],["impl Serialize for HpkePrivateKey"],["impl Serialize for HpkeKeyPair"]] +"hpke_rs":[["impl Serialize for HpkeKeyPair"],["impl Serialize for HpkePrivateKey"],["impl Serialize for Mode"],["impl Serialize for HpkePublicKey"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/tls_codec/trait.Deserialize.js b/implementors/tls_codec/trait.Deserialize.js index 7555aa8..606c95c 100644 --- a/implementors/tls_codec/trait.Deserialize.js +++ b/implementors/tls_codec/trait.Deserialize.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"hpke_rs":[["impl Deserialize for HpkePublicKey"],["impl Deserialize for &HpkePublicKey"]] +"hpke_rs":[["impl Deserialize for &HpkePublicKey"],["impl Deserialize for HpkePublicKey"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/tls_codec/trait.Serialize.js b/implementors/tls_codec/trait.Serialize.js index bcc076f..fa96398 100644 --- a/implementors/tls_codec/trait.Serialize.js +++ b/implementors/tls_codec/trait.Serialize.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"hpke_rs":[["impl Serialize for &HpkePublicKey"],["impl Serialize for HpkePublicKey"]] +"hpke_rs":[["impl Serialize for HpkePublicKey"],["impl Serialize for &HpkePublicKey"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/search-index.js b/search-index.js index 7292a68..e8bd321 100644 --- a/search-index.js +++ b/search-index.js @@ -1,5 +1,5 @@ var searchIndex = JSON.parse('{\ -"hpke_rs":{"doc":"HPKE","t":"NNNDNGGGDEDDDNNNNNNNNENNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLALLLLLLLLLLLLLALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLQCIKFFFF","n":["Auth","AuthPsk","Base","Context","CryptoError","HPKEKeyPair","HPKEPrivateKey","HPKEPublicKey","Hpke","HpkeError","HpkeKeyPair","HpkePrivateKey","HpkePublicKey","InconsistentPsk","InsecurePsk","InsufficientRandomness","InvalidConfig","InvalidInput","LockPoisoned","MessageLimitReached","MissingPsk","Mode","OpenError","Psk","UnknownMode","UnnecessaryPsk","as_slice","as_slice","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","default","default","default","derive_key_pair","deserialize","deserialize","deserialize","deserialize","eq","eq","eq","eq","export","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_keys","generate_key_pair","into","into","into","into","into","into","into","into_keys","key_schedule","new","new","new","new","open","open","prelude","private_key","public_key","receiver_export","seal","seal","seed","send_export","serialize","serialize","serialize","serialize","setup_receiver","setup_sender","test_util","tls_deserialize","tls_deserialize","tls_serialize","tls_serialize","tls_serialized_len","tls_serialized_len","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","zeroize","Error","HpkeMode","TryFrom","try_from","bytes_to_hex","hex_to_bytes","hex_to_bytes_option","vec_to_option_slice"],"q":[[0,"hpke_rs"],[161,"hpke_rs::prelude"],[165,"hpke_rs::test_util"],[169,"hpke_rs_crypto"],[170,"core::result"],[171,"serde::de"],[172,"alloc::vec"],[173,"core::fmt"],[174,"core::fmt"],[175,"hpke_rs_crypto::types"],[176,"hpke_rs_crypto::types"],[177,"serde::ser"],[178,"tls_codec"],[179,"std::io"],[180,"std::io"],[181,"core::any"]],"d":["Authenticated HPKE.","Authenticated HPKE with PSK.","HPKE Base mode.","The HPKE context. Note that the RFC currently doesn’t …","An error in the crypto library occurred.","","","","The HPKE configuration struct. This holds the …","HPKE Error types.","An HPKE key pair has an HPKE private and public key.","An HPKE private key is a byte vector.","An HPKE public key is a byte vector.","Inconsistent PSK input.","PSK input is too short (needs to be at least 32 bytes).","Unable to collect enough randomness.","Invalid configuration or arguments.","Invalid input.","A concurrency issue with an RwLock.","The message limit for this AEAD, key, and nonce.","PSK input is required but missing.","HPKE supports four modes.","Error opening an HPKE ciphertext.","HPKE with PSK.","Unknown HPKE mode.","PSK input is provided but not needed.","Get the raw key as byte slice.","Get the raw key as byte slice.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","7.1.2. DeriveKeyPair Derive a key pair for the used KEM …","","","","","","","","","5.3. Secret Export","","","","","","","","","","","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","","","","Returns the argument unchanged.","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Build a key pair from two keys","Cryptographic Dependencies Randomized algorithm to …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Split the key pair into the two keys","Creating the Encryption Context Generate the HPKE context …","Create a new HPKE public key. Consumes the public key …","Create a new HPKE private key. Consumes the private key …","Create a new HPKE key pair. Consumes the private and …","Set up the configuration for HPKE.","5.2. Encryption and Decryption","Single-Shot APIs 6.1. Encryption and DecryptionSingle shot …","Prelude for HPKE. Include this to get access to all the …","Get a reference to the HPKE private key of this key pair.","Get a reference to the HPKE public key of this key pair.","Single-Shot APIs 6.2. Secret ExportSingle shot API to …","5.2. Encryption and Decryption","Single-Shot APIs 6.1. Encryption and DecryptionSingle shot …","Set PRNG state for testing.","Single-Shot APIs 6.2. Secret ExportSingle shot API to …","","","","","Set up an HPKE receiver.","Set up an HPKE sender.","Test util module. Should be moved really.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The type returned in the event of a conversion error.","","Simple and safe type conversions that may fail in a …","Performs the conversion.","Convert bytes to a hex string.","Convert a hex string to a byte vector.","Convert a hex string to a byte vector. If the input is None…","Convert a byte slice into byte slice option. Returns Nonce …"],"i":[7,7,7,0,5,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,0,5,7,5,5,1,4,14,5,1,4,6,7,8,14,5,1,4,6,7,8,5,1,4,6,7,8,5,1,4,6,7,8,1,4,6,8,1,4,6,7,5,1,4,7,14,14,5,5,1,4,6,7,7,8,8,14,5,5,1,1,1,4,4,4,6,6,6,7,8,6,8,14,5,1,4,6,7,8,6,8,1,4,6,8,14,8,0,6,6,8,14,8,8,8,1,4,6,7,8,8,0,1,1,1,1,1,1,5,1,4,6,7,8,5,7,8,14,5,1,4,6,7,7,8,14,5,1,4,6,7,8,14,5,1,4,6,7,8,4,33,0,0,33,0,0,0,0],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[1,[[3,[2]]]],[4,[[3,[2]]]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[5,5],[1,1],[4,4],[6,6],[7,7],[[[8,[-1]]],[[8,[-1]]],9],[[-1,-2],10,[],[]],[[-1,-2],10,[],[]],[[-1,-2],10,[],[]],[[-1,-2],10,[],[]],[[-1,-2],10,[],[]],[[-1,-2],10,[],[]],[[],1],[[],4],[[],6],[[[8,[-1]],[3,[2]]],[[11,[6,5]]],9],[-1,[[11,[1]]],12],[-1,[[11,[4]]],12],[-1,[[11,[6]]],12],[-1,[[11,[7]]],12],[[5,5],13],[[1,1],13],[[4,4],13],[[7,7],13],[[[14,[-1]],[3,[2]],15],[[11,[[16,[2]],5]]],9],[[[14,[-1]],17],18,9],[[5,17],18],[[5,17],18],[[1,17],18],[[4,17],[[11,[10,19]]]],[[6,17],18],[[7,17],18],[[7,17],18],[[[8,[-1]],17],18,9],[[[8,[-1]],17],18,[20,9]],[-1,-1,[]],[21,5],[-1,-1,[]],[-1,-1,[]],[[[16,[2]]],1],[[[3,[2]]],1],[[[3,[2]]],4],[-1,-1,[]],[[[16,[2]]],4],[[[10,[[16,[2]],[16,[2]]]]],6],[[[10,[[3,[2]],[3,[2]]]]],6],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[[4,1],6],[[[8,[-1]]],[[11,[6,5]]],9],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[6,[[10,[4,1]]]],[[[8,[-1]],[3,[2]],[3,[2]],[3,[2]],[3,[2]]],[[11,[[14,[-1]],5]]],9],[[[16,[2]]],1],[[[16,[2]]],4],[[[16,[2]],[16,[2]]],6],[[7,22,23,24],[[8,[-1]]],9],[[[14,[-1]],[3,[2]],[3,[2]]],[[11,[[16,[2]],5]]],9],[[[8,[-1]],[3,[2]],4,[3,[2]],[3,[2]],[3,[2]],[25,[[3,[2]]]],[25,[[3,[2]]]],[25,[1]]],[[11,[[16,[2]],5]]],9],0,[6,4],[6,1],[[[8,[-1]],[3,[2]],4,[3,[2]],[25,[[3,[2]]]],[25,[[3,[2]]]],[25,[1]],[3,[2]],15],[[11,[[16,[2]],5]]],9],[[[14,[-1]],[3,[2]],[3,[2]]],[[11,[[16,[2]],5]]],9],[[[8,[-1]],1,[3,[2]],[3,[2]],[3,[2]],[25,[[3,[2]]]],[25,[[3,[2]]]],[25,[4]]],[[11,[[10,[[16,[2]],[16,[2]]]],5]]],9],[[[8,[-1]],[3,[2]]],[[11,[10,5]]],9],[[[8,[-1]],1,[3,[2]],[25,[[3,[2]]]],[25,[[3,[2]]]],[25,[4]],[3,[2]],15],[[11,[[10,[[16,[2]],[16,[2]]]],5]]],9],[[1,-1],11,26],[[4,-1],11,26],[[6,-1],11,26],[[7,-1],11,26],[[[8,[-1]],[3,[2]],4,[3,[2]],[25,[[3,[2]]]],[25,[[3,[2]]]],[25,[1]]],[[11,[[14,[-1]],5]]],9],[[[8,[-1]],1,[3,[2]],[25,[[3,[2]]]],[25,[[3,[2]]]],[25,[4]]],[[11,[[10,[[16,[2]],[14,[-1]]]],5]]],9],0,[-1,[[11,[1,27]]],28],[-1,[[11,[1,27]]],28],[[1,-1],[[11,[15,27]]],29],[[1,-1],[[11,[15,27]]],29],[1,15],[1,15],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,30,[]],[-1,30,[]],[-1,30,[]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[2,[[11,[7,5]]]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[-1,31,[]],[-1,31,[]],[-1,31,[]],[-1,31,[]],[-1,31,[]],[-1,31,[]],[-1,31,[]],[4,10],0,0,0,[-1,[[11,[-2]]],[],[]],[[[3,[2]]],30],[32,[[16,[2]]]],[[[25,[30]]],[[16,[2]]]],[[[3,[2]]],[[25,[[3,[2]]]]]]],"c":[5,6,7],"p":[[3,"HpkePublicKey",0],[15,"u8"],[15,"slice"],[3,"HpkePrivateKey",0],[4,"HpkeError",0],[3,"HpkeKeyPair",0],[4,"Mode",0],[3,"Hpke",0],[8,"HpkeCrypto",169],[15,"tuple"],[4,"Result",170],[8,"Deserializer",171],[15,"bool"],[3,"Context",0],[15,"usize"],[3,"Vec",172],[3,"Formatter",173],[6,"Result",173],[3,"Error",173],[8,"Debug",173],[4,"Error",174],[4,"KemAlgorithm",175],[4,"KdfAlgorithm",175],[4,"AeadAlgorithm",175],[4,"Option",176],[8,"Serializer",177],[4,"Error",178],[8,"Read",179],[8,"Write",179],[3,"String",180],[3,"TypeId",181],[15,"str"],[8,"TryFrom",161]]}\ +"hpke_rs":{"doc":"HPKE","t":"NNNDNGGGDEDDDNNNNNNNENNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLALLLLLLLLLLLLLALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLQCIKFFFF","n":["Auth","AuthPsk","Base","Context","CryptoError","HPKEKeyPair","HPKEPrivateKey","HPKEPublicKey","Hpke","HpkeError","HpkeKeyPair","HpkePrivateKey","HpkePublicKey","InconsistentPsk","InsecurePsk","InsufficientRandomness","InvalidConfig","InvalidInput","MessageLimitReached","MissingPsk","Mode","OpenError","Psk","UnknownMode","UnnecessaryPsk","as_slice","as_slice","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","default","default","default","derive_key_pair","deserialize","deserialize","deserialize","deserialize","eq","eq","eq","eq","export","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_keys","generate_key_pair","into","into","into","into","into","into","into","into_keys","key_schedule","new","new","new","new","open","open","prelude","private_key","public_key","receiver_export","seal","seal","seed","send_export","serialize","serialize","serialize","serialize","setup_receiver","setup_sender","test_util","tls_deserialize","tls_deserialize","tls_serialize","tls_serialize","tls_serialized_len","tls_serialized_len","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","zeroize","Error","HpkeMode","TryFrom","try_from","bytes_to_hex","hex_to_bytes","hex_to_bytes_option","vec_to_option_slice"],"q":[[0,"hpke_rs"],[160,"hpke_rs::prelude"],[164,"hpke_rs::test_util"],[168,"hpke_rs_crypto"],[169,"core::result"],[170,"serde::de"],[171,"alloc::vec"],[172,"core::fmt"],[173,"core::fmt"],[174,"hpke_rs_crypto::types"],[175,"hpke_rs_crypto::types"],[176,"serde::ser"],[177,"tls_codec"],[178,"std::io"],[179,"std::io"],[180,"core::any"]],"d":["Authenticated HPKE.","Authenticated HPKE with PSK.","HPKE Base mode.","The HPKE context. Note that the RFC currently doesn’t …","An error in the crypto library occurred.","","","","The HPKE configuration struct. This holds the …","HPKE Error types.","An HPKE key pair has an HPKE private and public key.","An HPKE private key is a byte vector.","An HPKE public key is a byte vector.","Inconsistent PSK input.","PSK input is too short (needs to be at least 32 bytes).","Unable to collect enough randomness.","Invalid configuration or arguments.","Invalid input.","The message limit for this AEAD, key, and nonce.","PSK input is required but missing.","HPKE supports four modes.","Error opening an HPKE ciphertext.","HPKE with PSK.","Unknown HPKE mode.","PSK input is provided but not needed.","Get the raw key as byte slice.","Get the raw key as byte slice.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","7.1.2. DeriveKeyPair Derive a key pair for the used KEM …","","","","","","","","","5.3. Secret Export","","","","","","","","","","","Returns the argument unchanged.","","Returns the argument unchanged.","","","Returns the argument unchanged.","","Returns the argument unchanged.","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Build a key pair from two keys","Cryptographic Dependencies Randomized algorithm to …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Split the key pair into the two keys","Creating the Encryption Context Generate the HPKE context …","Create a new HPKE public key. Consumes the public key …","Create a new HPKE private key. Consumes the private key …","Create a new HPKE key pair. Consumes the private and …","Set up the configuration for HPKE.","5.2. Encryption and Decryption","Single-Shot APIs 6.1. Encryption and DecryptionSingle shot …","Prelude for HPKE. Include this to get access to all the …","Get a reference to the HPKE private key of this key pair.","Get a reference to the HPKE public key of this key pair.","Single-Shot APIs 6.2. Secret ExportSingle shot API to …","5.2. Encryption and Decryption","Single-Shot APIs 6.1. Encryption and DecryptionSingle shot …","Set PRNG state for testing.","Single-Shot APIs 6.2. Secret ExportSingle shot API to …","","","","","Set up an HPKE receiver.","Set up an HPKE sender.","Test util module. Should be moved really.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The type returned in the event of a conversion error.","","Simple and safe type conversions that may fail in a …","Performs the conversion.","Convert bytes to a hex string.","Convert a hex string to a byte vector.","Convert a hex string to a byte vector. If the input is None…","Convert a byte slice into byte slice option. Returns Nonce …"],"i":[7,7,7,0,5,0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,0,5,7,5,5,1,4,14,5,1,4,6,7,8,14,5,1,4,6,7,8,5,1,4,6,7,8,5,1,4,6,7,8,1,4,6,8,1,4,6,7,5,1,4,7,14,14,5,5,1,4,6,7,7,8,8,14,5,5,1,1,1,4,4,4,6,6,6,7,8,6,8,14,5,1,4,6,7,8,6,8,1,4,6,8,14,8,0,6,6,8,14,8,8,8,1,4,6,7,8,8,0,1,1,1,1,1,1,5,1,4,6,7,8,5,7,8,14,5,1,4,6,7,7,8,14,5,1,4,6,7,8,14,5,1,4,6,7,8,4,33,0,0,33,0,0,0,0],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[1,[[3,[2]]]],[4,[[3,[2]]]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[5,5],[1,1],[4,4],[6,6],[7,7],[[[8,[-1]]],[[8,[-1]]],9],[[-1,-2],10,[],[]],[[-1,-2],10,[],[]],[[-1,-2],10,[],[]],[[-1,-2],10,[],[]],[[-1,-2],10,[],[]],[[-1,-2],10,[],[]],[[],1],[[],4],[[],6],[[[8,[-1]],[3,[2]]],[[11,[6,5]]],9],[-1,[[11,[1]]],12],[-1,[[11,[4]]],12],[-1,[[11,[6]]],12],[-1,[[11,[7]]],12],[[5,5],13],[[1,1],13],[[4,4],13],[[7,7],13],[[[14,[-1]],[3,[2]],15],[[11,[[16,[2]],5]]],9],[[[14,[-1]],17],18,9],[[5,17],18],[[5,17],18],[[1,17],18],[[4,17],[[11,[10,19]]]],[[6,17],18],[[7,17],18],[[7,17],18],[[[8,[-1]],17],18,9],[[[8,[-1]],17],18,[20,9]],[-1,-1,[]],[21,5],[-1,-1,[]],[[[16,[2]]],1],[[[3,[2]]],1],[-1,-1,[]],[[[3,[2]]],4],[-1,-1,[]],[[[16,[2]]],4],[[[10,[[3,[2]],[3,[2]]]]],6],[[[10,[[16,[2]],[16,[2]]]]],6],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[[4,1],6],[[[8,[-1]]],[[11,[6,5]]],9],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[6,[[10,[4,1]]]],[[[8,[-1]],[3,[2]],[3,[2]],[3,[2]],[3,[2]]],[[11,[[14,[-1]],5]]],9],[[[16,[2]]],1],[[[16,[2]]],4],[[[16,[2]],[16,[2]]],6],[[7,22,23,24],[[8,[-1]]],9],[[[14,[-1]],[3,[2]],[3,[2]]],[[11,[[16,[2]],5]]],9],[[[8,[-1]],[3,[2]],4,[3,[2]],[3,[2]],[3,[2]],[25,[[3,[2]]]],[25,[[3,[2]]]],[25,[1]]],[[11,[[16,[2]],5]]],9],0,[6,4],[6,1],[[[8,[-1]],[3,[2]],4,[3,[2]],[25,[[3,[2]]]],[25,[[3,[2]]]],[25,[1]],[3,[2]],15],[[11,[[16,[2]],5]]],9],[[[14,[-1]],[3,[2]],[3,[2]]],[[11,[[16,[2]],5]]],9],[[[8,[-1]],1,[3,[2]],[3,[2]],[3,[2]],[25,[[3,[2]]]],[25,[[3,[2]]]],[25,[4]]],[[11,[[10,[[16,[2]],[16,[2]]]],5]]],9],[[[8,[-1]],[3,[2]]],[[11,[10,5]]],9],[[[8,[-1]],1,[3,[2]],[25,[[3,[2]]]],[25,[[3,[2]]]],[25,[4]],[3,[2]],15],[[11,[[10,[[16,[2]],[16,[2]]]],5]]],9],[[1,-1],11,26],[[4,-1],11,26],[[6,-1],11,26],[[7,-1],11,26],[[[8,[-1]],[3,[2]],4,[3,[2]],[25,[[3,[2]]]],[25,[[3,[2]]]],[25,[1]]],[[11,[[14,[-1]],5]]],9],[[[8,[-1]],1,[3,[2]],[25,[[3,[2]]]],[25,[[3,[2]]]],[25,[4]]],[[11,[[10,[[16,[2]],[14,[-1]]]],5]]],9],0,[-1,[[11,[1,27]]],28],[-1,[[11,[1,27]]],28],[[1,-1],[[11,[15,27]]],29],[[1,-1],[[11,[15,27]]],29],[1,15],[1,15],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,30,[]],[-1,30,[]],[-1,30,[]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[2,[[11,[7,5]]]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[-1,[[11,[-2]]],[],[]],[-1,31,[]],[-1,31,[]],[-1,31,[]],[-1,31,[]],[-1,31,[]],[-1,31,[]],[-1,31,[]],[4,10],0,0,0,[-1,[[11,[-2]]],[],[]],[[[3,[2]]],30],[32,[[16,[2]]]],[[[25,[30]]],[[16,[2]]]],[[[3,[2]]],[[25,[[3,[2]]]]]]],"c":[5,6,7],"p":[[3,"HpkePublicKey",0],[15,"u8"],[15,"slice"],[3,"HpkePrivateKey",0],[4,"HpkeError",0],[3,"HpkeKeyPair",0],[4,"Mode",0],[3,"Hpke",0],[8,"HpkeCrypto",168],[15,"tuple"],[4,"Result",169],[8,"Deserializer",170],[15,"bool"],[3,"Context",0],[15,"usize"],[3,"Vec",171],[3,"Formatter",172],[6,"Result",172],[3,"Error",172],[8,"Debug",172],[4,"Error",173],[4,"KemAlgorithm",174],[4,"KdfAlgorithm",174],[4,"AeadAlgorithm",174],[4,"Option",175],[8,"Serializer",176],[4,"Error",177],[8,"Read",178],[8,"Write",178],[3,"String",179],[3,"TypeId",180],[15,"str"],[8,"TryFrom",160]]}\ }'); if (typeof window !== 'undefined' && window.initSearch) {window.initSearch(searchIndex)}; if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex}; diff --git a/src/hpke_rs/dh_kem.rs.html b/src/hpke_rs/dh_kem.rs.html index 76d229d..e626cdb 100644 --- a/src/hpke_rs/dh_kem.rs.html +++ b/src/hpke_rs/dh_kem.rs.html @@ -175,9 +175,13 @@ 175 176 177 +178 +179
//! DH KEM as described in §4.1. DH-Based KEM.
 
-use hpke_rs_crypto::{error::Error, types::KemAlgorithm, HpkeCrypto};
+use alloc::{string::ToString, vec::Vec};
+
+use hpke_rs_crypto::{error::Error, types::KemAlgorithm, HpkeCrypto};
 
 use crate::util::*;
 use crate::{
diff --git a/src/hpke_rs/kdf.rs.html b/src/hpke_rs/kdf.rs.html
index e71827a..63956d6 100644
--- a/src/hpke_rs/kdf.rs.html
+++ b/src/hpke_rs/kdf.rs.html
@@ -28,7 +28,11 @@
 28
 29
 30
-
use hpke_rs_crypto::{error::Error, types::KdfAlgorithm, HpkeCrypto};
+31
+32
+
use alloc::vec::Vec;
+
+use hpke_rs_crypto::{error::Error, types::KdfAlgorithm, HpkeCrypto};
 
 use crate::util::concat;
 
diff --git a/src/hpke_rs/kem.rs.html b/src/hpke_rs/kem.rs.html
index 3fbf089..e860613 100644
--- a/src/hpke_rs/kem.rs.html
+++ b/src/hpke_rs/kem.rs.html
@@ -97,7 +97,11 @@
 97
 98
 99
-
use hpke_rs_crypto::{error::Error, types::KemAlgorithm, HpkeCrypto};
+100
+101
+
use alloc::vec::Vec;
+
+use hpke_rs_crypto::{error::Error, types::KemAlgorithm, HpkeCrypto};
 
 use crate::dh_kem;
 use crate::util;
diff --git a/src/hpke_rs/lib.rs.html b/src/hpke_rs/lib.rs.html
index e14bd4b..18ff4d7 100644
--- a/src/hpke_rs/lib.rs.html
+++ b/src/hpke_rs/lib.rs.html
@@ -994,6 +994,14 @@
 994
 995
 996
+997
+998
+999
+1000
+1001
+1002
+1003
+1004
 
#![doc = include_str!("../Readme.md")]
 #![forbid(unsafe_code, unused_must_use, unstable_features)]
 #![deny(
@@ -1004,8 +1012,18 @@
     unused_extern_crates,
     unused_qualifications
 )]
+#![cfg_attr(not(test), no_std)]
 
-use std::sync::RwLock;
+extern crate alloc;
+#[cfg(feature = "std")]
+extern crate std;
+
+use alloc::{
+    format,
+    string::{String, ToString},
+    vec,
+    vec::Vec,
+};
 
 #[cfg(feature = "hpke-test-prng")]
 use hpke_rs_crypto::HpkeTestRng;
@@ -1075,15 +1093,13 @@
 
     /// Unable to collect enough randomness.
     InsufficientRandomness,
-
-    /// A concurrency issue with an [`RwLock`].
-    LockPoisoned,
 }
 
-impl std::error::Error for HpkeError {}
+#[cfg(feature = "std")]
+impl std::error::Error for HpkeError {}
 
-impl std::fmt::Display for HpkeError {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+impl core::fmt::Display for HpkeError {
+    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
         write!(f, "HPKE Error: {:?}", self)
     }
 }
@@ -1155,8 +1171,8 @@
     AuthPsk = 0x03,
 }
 
-impl std::fmt::Display for Mode {
-    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+impl core::fmt::Display for Mode {
+    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
         write!(f, "{:?}", self)
     }
 }
@@ -1198,8 +1214,8 @@
 }
 
 #[cfg(feature = "hazmat")]
-impl<Crypto: HpkeCrypto> std::fmt::Debug for Context<Crypto> {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+impl<Crypto: HpkeCrypto> core::fmt::Debug for Context<Crypto> {
+    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
         write!(
             f,
             "Context {{\n  key: {:?}\n  nonce: {:?}\n exporter_secret: {:?}\n seq no: {:?}\n}}",
@@ -1209,8 +1225,8 @@
 }
 
 #[cfg(not(feature = "hazmat"))]
-impl<Crypto: HpkeCrypto> std::fmt::Debug for Context<Crypto> {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+impl<Crypto: HpkeCrypto> core::fmt::Debug for Context<Crypto> {
+    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
         write!(
             f,
             "Context {{\n  key: {:?}\n  nonce: {:?}\n exporter_secret: {:?}\n seq no: {:?}\n}}",
@@ -1327,7 +1343,7 @@
     kem_id: KemAlgorithm,
     kdf_id: KdfAlgorithm,
     aead_id: AeadAlgorithm,
-    prng: RwLock<Crypto::HpkePrng>,
+    prng: Crypto::HpkePrng,
 }
 
 impl<Crypto: 'static + HpkeCrypto> Clone for Hpke<Crypto> {
@@ -1337,13 +1353,13 @@
             kem_id: self.kem_id,
             kdf_id: self.kdf_id,
             aead_id: self.aead_id,
-            prng: RwLock::new(Crypto::prng()),
+            prng: Crypto::prng(),
         }
     }
 }
 
-impl<Crypto: HpkeCrypto> std::fmt::Display for Hpke<Crypto> {
-    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+impl<Crypto: HpkeCrypto> core::fmt::Display for Hpke<Crypto> {
+    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
         write!(
             f,
             "{}_{}_{}_{}",
@@ -1368,7 +1384,7 @@
             kem_id,
             kdf_id,
             aead_id,
-            prng: RwLock::new(Crypto::prng()),
+            prng: Crypto::prng(),
         }
     }
 
@@ -1387,7 +1403,7 @@
     /// The encapsulated secret is returned together with the context.
     /// If the secret key is missing in an authenticated mode, an error is returned.
     pub fn setup_sender(
-        &self,
+        &mut self,
         pk_r: &HpkePublicKey,
         info: &[u8],
         psk: Option<&[u8]>,
@@ -1474,7 +1490,7 @@
     /// Returns the encapsulated secret and the ciphertext, or an error.
     #[allow(clippy::too_many_arguments)]
     pub fn seal(
-        &self,
+        &mut self,
         pk_r: &HpkePublicKey,
         info: &[u8],
         aad: &[u8],
@@ -1530,7 +1546,7 @@
     /// exporter context and length.
     #[allow(clippy::too_many_arguments)]
     pub fn send_export(
-        &self,
+        &mut self,
         pk_r: &HpkePublicKey,
         info: &[u8],
         psk: Option<&[u8]>,
@@ -1670,9 +1686,8 @@
     /// This is equivalent to `derive_key_pair(random_vector(sk.len()))`
     ///
     /// Returns an `HpkeKeyPair`.
-    pub fn generate_key_pair(&self) -> Result<HpkeKeyPair, HpkeError> {
-        let mut prng = self.prng.write().map_err(|_| HpkeError::LockPoisoned)?;
-        let (sk, pk) = kem::key_gen::<Crypto>(self.kem_id, &mut prng)?;
+    pub fn generate_key_pair(&mut self) -> Result<HpkeKeyPair, HpkeError> {
+        let (sk, pk) = kem::key_gen::<Crypto>(self.kem_id, &mut self.prng)?;
         Ok(HpkeKeyPair::new(sk, pk))
     }
 
@@ -1686,8 +1701,8 @@
     }
 
     #[inline]
-    pub(crate) fn random(&self, len: usize) -> Result<Vec<u8>, HpkeError> {
-        let mut prng = self.prng.write().map_err(|_| HpkeError::LockPoisoned)?;
+    pub(crate) fn random(&mut self, len: usize) -> Result<Vec<u8>, HpkeError> {
+        let prng = &mut self.prng;
         let mut out = vec![0u8; len];
 
         #[cfg(feature = "hpke-test-prng")]
@@ -1790,8 +1805,8 @@
 }
 
 #[cfg(not(feature = "hazmat"))]
-impl std::fmt::Debug for HpkePrivateKey {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
+impl core::fmt::Debug for HpkePrivateKey {
+    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> Result<(), core::fmt::Error> {
         f.debug_struct("HpkePrivateKey")
             .field("value", &"***")
             .finish()
@@ -1799,8 +1814,8 @@
 }
 
 #[cfg(feature = "hazmat")]
-impl std::fmt::Debug for HpkePrivateKey {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
+impl core::fmt::Debug for HpkePrivateKey {
+    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> Result<(), core::fmt::Error> {
         f.debug_struct("HpkePrivateKey")
             .field("value", &self.value)
             .finish()
@@ -1887,14 +1902,15 @@
 /// Test util module. Should be moved really.
 #[cfg(feature = "hpke-test")]
 pub mod test_util {
+    use alloc::{format, string::String, vec, vec::Vec};
+
     use crate::HpkeError;
     use hpke_rs_crypto::{HpkeCrypto, HpkeTestRng};
 
     impl<Crypto: HpkeCrypto> super::Hpke<Crypto> {
         /// Set PRNG state for testing.
-        pub fn seed(&self, seed: &[u8]) -> Result<(), HpkeError> {
-            let mut prng = self.prng.write().map_err(|_| HpkeError::LockPoisoned)?;
-            prng.seed(seed);
+        pub fn seed(&mut self, seed: &[u8]) -> Result<(), HpkeError> {
+            self.prng.seed(seed);
             Ok(())
         }
     }
diff --git a/src/hpke_rs/prelude.rs.html b/src/hpke_rs/prelude.rs.html
index dd7776a..41db4f7 100644
--- a/src/hpke_rs/prelude.rs.html
+++ b/src/hpke_rs/prelude.rs.html
@@ -7,5 +7,5 @@
 //! Include this to get access to all the public functions of HPKE.
 
 pub use super::{Mode as HpkeMode, *};
-pub use std::convert::TryFrom;
+pub use core::convert::TryFrom;
 
\ No newline at end of file diff --git a/src/hpke_rs/util.rs.html b/src/hpke_rs/util.rs.html index 5e150a7..f3a73c0 100644 --- a/src/hpke_rs/util.rs.html +++ b/src/hpke_rs/util.rs.html @@ -19,7 +19,11 @@ 19 20 21 -
#[inline]
+22
+23
+
use alloc::vec::Vec;
+
+#[inline]
 pub(crate) fn concat(values: &[&[u8]]) -> Vec<u8> {
     values.join(&[][..])
 }