From b965b4b41daf74943d99c823561eaa5475ec3ccc Mon Sep 17 00:00:00 2001 From: chrysn Date: Fri, 29 Sep 2023 23:24:31 +0200 Subject: [PATCH] WIP: Use edhoc-const's (new) U8 re-export for U8 genericity edhoc-consts already pub uses a U8 in Rust mode, so it stands to reason to assume that the re-export in hacspec was just missing (and didn't show because most code that deals with it already explicitly knows the mode everything is in). --- consts/src/lib.rs | 1 + crypto/edhoc-crypto-trait/Cargo.toml | 1 - crypto/edhoc-crypto-trait/src/lib.rs | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/consts/src/lib.rs b/consts/src/lib.rs index fb48fc74..c8927942 100644 --- a/consts/src/lib.rs +++ b/consts/src/lib.rs @@ -199,6 +199,7 @@ mod rust { #[cfg(feature = "hacspec")] mod hacspec { use super::common::*; + pub use hacspec_lib::U8; use hacspec_lib::*; array!(BytesMessageBuffer, MAX_MESSAGE_SIZE_LEN, U8); diff --git a/crypto/edhoc-crypto-trait/Cargo.toml b/crypto/edhoc-crypto-trait/Cargo.toml index 671a20e5..9f02aaba 100644 --- a/crypto/edhoc-crypto-trait/Cargo.toml +++ b/crypto/edhoc-crypto-trait/Cargo.toml @@ -5,4 +5,3 @@ edition = "2021" [dependencies] edhoc-consts = { path = "../../consts", default-features = false } -hacspec-lib = { version = "0.1.0-beta.1", default-features = false } diff --git a/crypto/edhoc-crypto-trait/src/lib.rs b/crypto/edhoc-crypto-trait/src/lib.rs index 4d040ddf..53162528 100644 --- a/crypto/edhoc-crypto-trait/src/lib.rs +++ b/crypto/edhoc-crypto-trait/src/lib.rs @@ -2,7 +2,6 @@ #![no_std] use edhoc_consts::*; -use hacspec_lib::U8; pub trait Crypto { fn sha256_digest(message: &BytesMaxBuffer, message_len: usize) -> BytesHashLen;