ruma-events: Add the new key agreement method.

This commit is contained in:
Damir Jelić 2020-07-14 16:35:09 +02:00 committed by Jonas Platte
parent ded60cc935
commit c93cfb986b
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67

View File

@ -25,11 +25,13 @@ pub enum HashAlgorithm {
/// A key agreement protocol.
#[derive(Clone, Copy, Debug, PartialEq, Display, EnumString, Serialize, Deserialize)]
#[non_exhaustive]
#[serde(rename_all = "snake_case")]
#[strum(serialize_all = "snake_case")]
#[serde(rename_all = "kebab-case")]
#[strum(serialize_all = "kebab-case")]
pub enum KeyAgreementProtocol {
/// The [Curve25519](https://cr.yp.to/ecdh.html) key agreement protocol.
Curve25519,
/// The Curve25519 key agreement protocol with check for public keys.
Curve25519HkdfSha256,
}
/// A message authentication code algorithm.