diff --git a/src/envelope.rs b/src/envelope.rs index e1e07f1..aa77309 100644 --- a/src/envelope.rs +++ b/src/envelope.rs @@ -122,24 +122,24 @@ pub(crate) struct OpenedInnerEnvelope { } #[cfg(not(test))] -type SealRaw = ( +type SealRawResult = ( Envelope, GenericArray::Hash as Digest>::OutputSize>, ); #[cfg(test)] -type SealRaw = ( +type SealRawResult = ( Envelope, GenericArray::Hash as Digest>::OutputSize>, Vec, ); #[cfg(not(test))] -type Seal = ( +type SealResult = ( Envelope, PublicKey<::Group>, GenericArray::Hash as Digest>::OutputSize>, ); #[cfg(test)] -type Seal = ( +type SealResult = ( Envelope, PublicKey<::Group>, GenericArray::Hash as Digest>::OutputSize>, @@ -207,7 +207,7 @@ impl Envelope { key: &[u8], server_s_pk: &[u8], optional_ids: Option, - ) -> Result, ProtocolError> { + ) -> Result, ProtocolError> { let mut nonce = vec![0u8; NONCE_LEN]; rng.fill_bytes(&mut nonce); @@ -238,7 +238,7 @@ impl Envelope { nonce: &[u8], aad: &[u8], mode: InnerEnvelopeMode, - ) -> Result, InternalPakeError> { + ) -> Result, InternalPakeError> { let h = Hkdf::::new(None, key); let mut hmac_key = vec![0u8; Self::hmac_key_size()]; let mut export_key = vec![0u8; Self::export_key_size()]; diff --git a/src/opaque.rs b/src/opaque.rs index 403ef5a..553bf05 100644 --- a/src/opaque.rs +++ b/src/opaque.rs @@ -573,7 +573,7 @@ pub struct ClientLoginFinishResult { /// Instance of the ClientLogin, only used in tests for checking zeroize #[cfg(test)] pub state: ClientLogin, - /// Handshake secret, only used tests + /// Handshake secret, only used in tests #[cfg(test)] pub handshake_secret: Vec, /// Client MAC key, only used in tests @@ -752,9 +752,10 @@ pub struct ServerLoginStartResult { pub message: CredentialResponse, /// The state that the server must keep in order to finish the protocl pub state: ServerLogin, - /// Handshake secret, only used tests + /// Handshake secret, only used in tests #[cfg(test)] pub handshake_secret: Vec, + /// Server MAC key, only used in tests #[cfg(test)] pub server_mac_key: GenericArray::OutputSize>, }