You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm adding some code using aes-gcm/aes/cmac into a large project which is built with no-std and its own std implementation. So my code has to be no-std. But there's error:
error[E0152]: duplicate lang item in crate `std` (which `crypto_common` depends on): `panic_impl`.
How to configure that crypto_common dependency to be no-std?
Here's some part of my code, it's no more than the examples:
let k = Key::<Aes128Gcm>::from_slice(key);
let cipher = Aes128Gcm::new(&k);
let nonce = Nonce::from_slice(...);
cipher.decrypt_in_place_detached(...).map_errr(...)
let mut nonce = [0u8; 16];
rand::thread_rng().fill_bytes(&mut nonce);
let mut mac = Cmac::<Aes128>::new_from_slice(...).unwrap();
mac.update(...);
The text was updated successfully, but these errors were encountered:
You are likely not disabling default features somewhere that's enabling crypto-common/std. Try adding default-features = false to all of your crate imports.
Note that all of our crates are tested in CI on no_std targets, e.g.:
I'm adding some code using aes-gcm/aes/cmac into a large project which is built with no-std and its own std implementation. So my code has to be no-std. But there's error:
How to configure that crypto_common dependency to be no-std?
Here's some part of my code, it's no more than the examples:
The text was updated successfully, but these errors were encountered: