From 0f85b85acb0bd322ff7408c25dc09a84ff6621dc Mon Sep 17 00:00:00 2001 From: Rob Napier Date: Sun, 13 Sep 2020 09:59:36 -0400 Subject: [PATCH] Improve doc text --- lib/std/crypto/pbkdf2.zig | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/std/crypto/pbkdf2.zig b/lib/std/crypto/pbkdf2.zig index 6cf1e8a75e11bcfbb948d623e270c37a8b01fcc9..2f9b72022050c0582af67d34b4878a2c67a636a0 100644 --- a/lib/std/crypto/pbkdf2.zig +++ b/lib/std/crypto/pbkdf2.zig @@ -10,11 +10,11 @@ const debug = std.debug; const assert = debug.assert; const mem = std.mem; -//! PBKDF2 (Password-Based Key Derivation Function 2) is a specific Key Derivation Function, -//! intended to turn a weak, human generated password into a strong key, suitable for cryptographic -//! uses. It does this by salting and stretching the password. Salting injects non-secret random -//! data, so that identical passwords will be converted into unique keys. Stretching applies a -//! deliberately slow hashing function to frustrate brute-force guessing. +//! PBKDF2 (Password-Based Key Derivation Function 2) is intended to turn a weak, human generated +//! password into a strong key, suitable for cryptographic uses. It does this by salting and +//! stretching the password. Salting injects non-secret random data, so that identical passwords +//! will be converted into unique keys. Stretching applies a deliberately slow hashing function to +//! frustrate brute-force guessing. //! //! PBKDF2 is defined in RFC 2898, and is a recommendation of NIST SP 800-132. @@ -46,8 +46,7 @@ const mem = std.mem; // Based on Apple's CommonKeyDerivation, based originally on code by Damien Bergamini. -/// Given a password, salt, iteration count (rounds), and a pseudo-random function, generates a -/// derived key in the provided buffer slice. +/// Apply PBKDF2 to generate a key from a password. /// /// derivedKey: Slice of appropriate size for generated key. Generally 16 or 32 bytes in length. /// May be uninitialized. All bytes will be written. -- 2.54.0