From 709f1005e7d4a88554769ad8c5c59e1b610502ed Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Mon, 19 Apr 2021 07:03:05 -0700 Subject: [PATCH] argon2: forbid unsafe code outside parallel implementation Eventually it'd be nice to have a safe parallel implementation as well: https://github.com/RustCrypto/password-hashes/issues/154 --- argon2/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/argon2/src/lib.rs b/argon2/src/lib.rs index dd79d569..cbe328b0 100644 --- a/argon2/src/lib.rs +++ b/argon2/src/lib.rs @@ -63,12 +63,14 @@ //! [Password Hashing Competition]: https://www.password-hashing.net/ #![no_std] +// TODO(tarcieri): safe parallel implementation +// See: https://github.com/RustCrypto/password-hashes/issues/154 +#![cfg_attr(not(feature = "parallel"), forbid(unsafe_code))] #![cfg_attr(docsrs, feature(doc_cfg))] #![doc( html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo.svg", html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo.svg" )] -#![deny(unsafe_code)] #![warn(rust_2018_idioms, missing_docs)] #[macro_use]