From d0a84294aa904d4461bf7f0cba9eecb96dcc0912 Mon Sep 17 00:00:00 2001 From: Emil Engler Date: Wed, 13 Sep 2023 16:36:35 +0200 Subject: [PATCH] cli: Move `StaticKEM::keygen` out of `unsafe` This commit moves the `StaticKEM::keygen` call out of an `unsafe` call, because the function is not unsafe. --- src/cli.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli.rs b/src/cli.rs index 3e19b0a5..dd56fff4 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -164,9 +164,9 @@ impl Cli { // generate the keys and store them in files let mut ssk = crate::protocol::SSk::random(); let mut spk = crate::protocol::SPk::random(); + StaticKEM::keygen(ssk.secret_mut(), spk.secret_mut())?; unsafe { - StaticKEM::keygen(ssk.secret_mut(), spk.secret_mut())?; ssk.store_secret(skf)?; spk.store_secret(pkf)?; }