Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pbkdf2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
[![Project Chat][chat-image]][chat-link]
[![Build Status][build-image]][build-link]

Pure Rust implementation of the [Password-Based Key Derivation Function v2 (PBKDF2)][1].
Pure Rust implementation of the [Password-Based Key Derivation Function v2 (PBKDF2)][1] as specified
in [RFC 2898][2].

## License

Expand Down Expand Up @@ -40,3 +41,4 @@ dual licensed as above, without any additional terms or conditions.
[//]: # (general links)

[1]: https://en.wikipedia.org/wiki/PBKDF2
[2]: https://datatracker.ietf.org/doc/html/rfc2898
18 changes: 8 additions & 10 deletions pbkdf2/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
//! This crate implements the PBKDF2 key derivation function as specified
//! in [RFC 2898](https://tools.ietf.org/html/rfc2898).
//!
#![no_std]
#![doc = include_str!("../README.md")]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg",
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg"
)]

//! # Examples
//!
//! PBKDF2 is defined in terms of a keyed pseudo-random function (PRF).
Expand Down Expand Up @@ -76,13 +81,6 @@
//! # }
//! ```

#![no_std]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg",
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg"
)]

#[cfg(feature = "password-hash")]
extern crate alloc;

Expand Down
3 changes: 2 additions & 1 deletion scrypt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
![Rust Version][rustc-image]
[![Project Chat][chat-image]][chat-link]

Pure Rust implementation of the [scrypt key derivation function][1].
Pure Rust implementation of the [scrypt key derivation function][1], a sequential memory hard
function which can also be used for password hashing.

## License

Expand Down
26 changes: 10 additions & 16 deletions scrypt/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
//! This crate implements the Scrypt key derivation function as specified
//! in \[1\].
//!
#![no_std]
#![doc = include_str!("../README.md")]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg",
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg"
)]

//! If you are only using the low-level [`scrypt`] function instead of the
//! higher-level [`Scrypt`] struct to produce/verify hash strings,
//! it's recommended to disable default features in your `Cargo.toml`:
//!
//! ```toml
//! [dependencies]
//! scrypt = { version = "0.2", default-features = false }
//! scrypt = { version = "0.12", default-features = false }
//! ```
//!
//! # Usage (simple with default params)
//! # Usage (simple PHC password hash usage with default params)
//!
#![cfg_attr(all(feature = "alloc", feature = "getrandom"), doc = "```")]
#![cfg_attr(not(all(feature = "alloc", feature = "getrandom")), doc = "```ignore")]
Expand All @@ -36,17 +41,6 @@
//! # Ok(())
//! # }
//! ```
//!
//! # References
//! \[1\] - [C. Percival. Stronger Key Derivation Via Sequential
//! Memory-Hard Functions](http://www.tarsnap.com/scrypt/scrypt.pdf)

#![no_std]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg",
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg"
)]

#[macro_use]
extern crate alloc;
Expand Down