Skip to content

Commit c31a865

Browse files
committed
add no-std flags to group keys
1 parent 9cffcff commit c31a865

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/dkg/group_key.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ impl GroupSecretKeyShard {
6969
Ok(Self { shard })
7070
}
7171

72+
#[cfg(feature = "std")]
7273
pub fn export<'a, I, R>(&self, recipients: I, csrng: R) -> Vec<u8>
7374
where
7475
I: IntoIterator<Item = &'a Identity>,
@@ -78,6 +79,8 @@ impl GroupSecretKeyShard {
7879
multienc::encrypt(&self.shard, recipients, csrng)
7980
}
8081

82+
83+
#[cfg(feature = "std")]
8184
pub fn import(secret: &Secret, exported: &[u8]) -> io::Result<Self> {
8285
let bytes = multienc::decrypt(secret, exported).map_err(io::Error::other)?;
8386

@@ -169,6 +172,7 @@ mod tests {
169172
}
170173

171174
#[test]
175+
#[cfg(feature = "std")]
172176
fn export_import() {
173177
let secrets = [
174178
Secret::random(thread_rng()),

0 commit comments

Comments
 (0)