Implement serde serialization and deserialization to follow Rust's standards.
This commit is contained in:
committed by
Kevin Lewi
parent
940d1dcdb2
commit
055e76a115
@@ -11,6 +11,7 @@ use crate::{
|
||||
errors::{utils::check_slice_size_atleast, InternalPakeError, PakeError, ProtocolError},
|
||||
group::Group,
|
||||
hash::Hash,
|
||||
impl_serialize_and_deserialize_for,
|
||||
key_exchange::traits::{KeyExchange, ToBytesWithPointers},
|
||||
keypair::{Key, KeyPair, SizedBytesExt},
|
||||
map_to_curve::GroupWithMapToCurve,
|
||||
@@ -83,6 +84,8 @@ impl<CS: CipherSuite> ClientRegistration<CS> {
|
||||
}
|
||||
}
|
||||
|
||||
impl_serialize_and_deserialize_for!(ClientRegistration);
|
||||
|
||||
/// Optional parameters for client registration finish
|
||||
pub enum ClientRegistrationFinishParameters {
|
||||
/// Specifying the identifiers idU and idS (corresponding to custom identifier mode)
|
||||
@@ -385,6 +388,8 @@ impl<CS: CipherSuite> ServerRegistration<CS> {
|
||||
}
|
||||
}
|
||||
|
||||
impl_serialize_and_deserialize_for!(ServerRegistration);
|
||||
|
||||
// Login
|
||||
// =====
|
||||
|
||||
@@ -454,6 +459,8 @@ impl<CS: CipherSuite> ClientLogin<CS> {
|
||||
}
|
||||
}
|
||||
|
||||
impl_serialize_and_deserialize_for!(ClientLogin);
|
||||
|
||||
/// Optional parameters for client login start
|
||||
pub enum ClientLoginStartParameters {
|
||||
/// Specifying a plaintext info field that will be sent to the server
|
||||
@@ -880,6 +887,8 @@ impl<CS: CipherSuite> ServerLogin<CS> {
|
||||
}
|
||||
}
|
||||
|
||||
impl_serialize_and_deserialize_for!(ServerLogin);
|
||||
|
||||
// Zeroize on drop implementations
|
||||
|
||||
// This can't be derived because of the use of a phantom parameter
|
||||
|
||||
Reference in New Issue
Block a user