Skip to content

Commit d686f4a

Browse files
committed
zeroize v1.5.0
1 parent cf0901a commit d686f4a

File tree

4 files changed

+24
-41
lines changed

4 files changed

+24
-41
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

zeroize/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## 1.5.0 (2022-01-14)
8+
### Added
9+
- `Zeroize` impls for `PhantomData`, `PhantomPinned`, and tuples with 0-10 elements ([#660])
10+
- `#[zeroize(bound = "T: MyTrait")]` ([#663])
11+
- `ZeroizeOnDrop` trait and custom derive ([#699], [#700], [#703])
12+
13+
[#660]: https://github.com/RustCrypto/utils/pull/660
14+
[#663]: https://github.com/RustCrypto/utils/pull/663
15+
[#699]: https://github.com/RustCrypto/utils/pull/699
16+
[#700]: https://github.com/RustCrypto/utils/pull/700
17+
[#703]: https://github.com/RustCrypto/utils/pull/703
18+
719
## 1.4.3 (2021-11-04)
820
### Added
921
- Implement `Zeroize` for `NonZeroX`

zeroize/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ operation will not be 'optimized away' by the compiler.
77
Uses a portable pure Rust implementation that works everywhere,
88
even WASM!
99
"""
10-
version = "1.5.0-pre" # Also update html_root_url in lib.rs when bumping this
10+
version = "1.5.0" # Also update html_root_url in lib.rs when bumping this
1111
authors = ["The RustCrypto Project Developers"]
1212
license = "Apache-2.0 OR MIT"
1313
repository = "https://github.com/RustCrypto/utils/tree/master/zeroize"

zeroize/src/lib.rs

Lines changed: 10 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,13 @@
1-
//! Securely zero memory with a simple trait ([`Zeroize`]) built on stable Rust
2-
//! primitives which guarantee the operation will not be "optimized away".
3-
//!
4-
//! ## About
5-
//!
6-
//! [Zeroing memory securely is hard] - compilers optimize for performance, and
7-
//! in doing so they love to "optimize away" unnecessary zeroing calls. There are
8-
//! many documented "tricks" to attempt to avoid these optimizations and ensure
9-
//! that a zeroing routine is performed reliably.
10-
//!
11-
//! This crate isn't about tricks: it uses [`core::ptr::write_volatile`]
12-
//! and [`core::sync::atomic`] memory fences to provide easy-to-use, portable
13-
//! zeroing behavior which works on all of Rust's core number types and slices
14-
//! thereof, implemented in pure Rust with no usage of FFI or assembly.
15-
//!
16-
//! - No insecure fallbacks!
17-
//! - No dependencies!
18-
//! - No FFI or inline assembly! **WASM friendly** (and tested)!
19-
//! - `#![no_std]` i.e. **embedded-friendly**!
20-
//! - No functionality besides securely zeroing memory!
21-
//! - (Optional) Custom derive support for zeroing complex structures
22-
//!
23-
//! ## Minimum Supported Rust Version
24-
//!
25-
//! Requires Rust **1.51** or newer.
26-
//!
27-
//! In the future, we reserve the right to change MSRV (i.e. MSRV is out-of-scope
28-
//! for this crate's SemVer guarantees), however when we do it will be accompanied
29-
//! by a minor version bump.
30-
//!
1+
#![no_std]
2+
#![cfg_attr(docsrs, feature(doc_cfg))]
3+
#![doc(
4+
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg",
5+
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg",
6+
html_root_url = "https://docs.rs/zeroize/1.5.0"
7+
)]
8+
#![doc = include_str!("../README.md")]
9+
#![warn(missing_docs, rust_2018_idioms, unused_qualifications)]
10+
3111
//! ## Usage
3212
//!
3313
//! ```
@@ -221,15 +201,6 @@
221201
//! [good cryptographic hygiene]: https://github.com/veorq/cryptocoding#clean-memory-of-secret-data
222202
//! [`Ordering::SeqCst`]: core::sync::atomic::Ordering::SeqCst
223203
224-
#![no_std]
225-
#![cfg_attr(docsrs, feature(doc_cfg))]
226-
#![doc(
227-
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg",
228-
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg",
229-
html_root_url = "https://docs.rs/zeroize/1.5.0-pre"
230-
)]
231-
#![warn(missing_docs, rust_2018_idioms, unused_qualifications)]
232-
233204
#[cfg(feature = "alloc")]
234205
#[cfg_attr(test, macro_use)]
235206
extern crate alloc;

0 commit comments

Comments
 (0)