Implement custom error type

This commit is contained in:
daxpedda
2021-07-23 15:23:10 -07:00
committed by Kevin Lewi
parent 17b9c49473
commit 4ce61acc6e
6 changed files with 220 additions and 48 deletions
+3 -3
View File
@@ -14,7 +14,7 @@ use crate::{
},
group::Group,
key_exchange::traits::{FromBytes, KeyExchange, ToBytes},
keypair::{KeyPair, PublicKey, SizedBytesExt},
keypair::{KeyPair, PublicKey, SecretKey, SizedBytesExt},
opaque::ServerSetup,
};
use digest::Digest;
@@ -193,9 +193,9 @@ impl<CS: CipherSuite> RegistrationUpload<CS> {
}
// Creates a dummy instance used for faking a [CredentialResponse]
pub(crate) fn dummy<R: RngCore + CryptoRng>(
pub(crate) fn dummy<R: RngCore + CryptoRng, S: SecretKey<CS::Group>>(
rng: &mut R,
server_setup: &ServerSetup<CS>,
server_setup: &ServerSetup<CS, S>,
) -> Self {
let mut masking_key = vec![0u8; <CS::Hash as Digest>::OutputSize::to_usize()];
rng.fill_bytes(&mut masking_key);