Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
supinie committed Jun 5, 2024
1 parent 7dd6b70 commit 7cb50bc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
13 changes: 9 additions & 4 deletions src/kem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ pub(crate) fn generate_key_pair(
///
/// # Ok::<(), enc_rust::errors::KeyGenerationError>(())
/// ```
pub fn generate_keypair_512(rng: Option<&mut dyn AcceptableRng>) -> Result<(PublicKey, PrivateKey), KeyGenerationError> {
pub fn generate_keypair_512(
rng: Option<&mut dyn AcceptableRng>,
) -> Result<(PublicKey, PrivateKey), KeyGenerationError> {
generate_key_pair(rng, K::Two)
}

Expand Down Expand Up @@ -196,7 +198,9 @@ pub fn generate_keypair_512(rng: Option<&mut dyn AcceptableRng>) -> Result<(Publ
///
/// # Ok::<(), enc_rust::errors::KeyGenerationError>(())
/// ```
pub fn generate_keypair_768(rng: Option<&mut dyn AcceptableRng>) -> Result<(PublicKey, PrivateKey), KeyGenerationError> {
pub fn generate_keypair_768(
rng: Option<&mut dyn AcceptableRng>,
) -> Result<(PublicKey, PrivateKey), KeyGenerationError> {
generate_key_pair(rng, K::Three)
}

Expand Down Expand Up @@ -226,11 +230,12 @@ pub fn generate_keypair_768(rng: Option<&mut dyn AcceptableRng>) -> Result<(Publ
///
/// # Ok::<(), enc_rust::errors::KeyGenerationError>(())
/// ```
pub fn generate_keypair_1024(rng: Option<&mut dyn AcceptableRng>) -> Result<(PublicKey, PrivateKey), KeyGenerationError> {
pub fn generate_keypair_1024(
rng: Option<&mut dyn AcceptableRng>,
) -> Result<(PublicKey, PrivateKey), KeyGenerationError> {
generate_key_pair(rng, K::Four)
}


impl PrivateKey {
pub(crate) const fn sec_level(&self) -> SecurityLevel {
self.sk.sec_level()
Expand Down
5 changes: 1 addition & 4 deletions src/tests/kem.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#![allow(warnings)]
#[cfg(test)]
mod kem_tests {
use crate::{
kem::*,
tests::params::params_tests::sec_level_strategy,
};
use crate::{kem::*, tests::params::params_tests::sec_level_strategy};
use proptest::prelude::*;

prop_compose! {
Expand Down

0 comments on commit 7cb50bc

Please sign in to comment.