diff --git a/Cargo.lock b/Cargo.lock index 3a062c0..6a3a8a7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1776,7 +1776,7 @@ dependencies = [ [[package]] name = "keyfork-entropy" -version = "0.1.0" +version = "0.1.1" dependencies = [ "keyfork-bug", "smex", diff --git a/crates/util/keyfork-entropy/Cargo.toml b/crates/util/keyfork-entropy/Cargo.toml index dd1100f..f3b8ead 100644 --- a/crates/util/keyfork-entropy/Cargo.toml +++ b/crates/util/keyfork-entropy/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "keyfork-entropy" -version = "0.1.0" +version = "0.1.1" edition = "2021" license = "MIT" diff --git a/crates/util/keyfork-entropy/src/main.rs b/crates/util/keyfork-entropy/src/main.rs index 4ffbb98..7f36aab 100644 --- a/crates/util/keyfork-entropy/src/main.rs +++ b/crates/util/keyfork-entropy/src/main.rs @@ -10,10 +10,12 @@ fn main() -> Result<(), Box> { bit_size % 8 == 0, "Bit size must be divisible by 8, got: {bit_size}" ); - assert!( - bit_size <= 256, - "Maximum supported bit size is 256, got: {bit_size}" - ); + match bit_size { + 128 | 256 | 512 => {} + _ => { + eprintln!("reading entropy of uncommon size: {bit_size}"); + } + } let entropy = keyfork_entropy::generate_entropy_of_size(bit_size / 8)?; println!("{}", smex::encode(entropy));