mirror of https://github.com/ctz/rustls
crypto: trait tweaks for HpkeSuite, HpkePublicKey
The `HpkeSuite` type is small enough to be a candidate for `Copy`. The `HpkePublicKey` type should be `Debug` and `Clone` so we can easily use it for GREASE ECH configurations.
This commit is contained in:
parent
50aa4d4a1c
commit
bd66ee4444
|
@ -26,7 +26,7 @@ pub trait HpkeProvider: Debug + Send + Sync + 'static {
|
|||
}
|
||||
|
||||
/// An HPKE suite, specifying a key encapsulation mechanism and a symmetric cipher suite.
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct HpkeSuite {
|
||||
/// The choice of HPKE key encapsulation mechanism.
|
||||
pub kem: HpkeKem,
|
||||
|
@ -110,6 +110,7 @@ pub trait HpkeOpener: Debug + Send + Sync + 'static {
|
|||
}
|
||||
|
||||
/// An HPKE public key.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct HpkePublicKey(pub Vec<u8>);
|
||||
|
||||
/// An HPKE private key.
|
||||
|
|
Loading…
Reference in New Issue