authorgravatar for rob@neverwood.orgRob Napier <rob@neverwood.org> 2020-09-13 09:59:36-04:00
committergravatar for rob@neverwood.orgRob Napier <rob@neverwood.org> 2020-09-13 09:59:36-04:00
log0f85b85acb0bd322ff7408c25dc09a84ff6621dc
tree5941d076597cc33a9d31d1d8153ff82f0f81145e
parent17156e1775f60893b4c5040d7a0073659ea9157d

Improve doc text


1 files changed, 6 insertions(+), 7 deletions(-)

lib/std/crypto/pbkdf2.zig+6-7
......@@ -10,11 +10,11 @@ const debug = std.debug;
1010const assert = debug.assert;
1111const mem = std.mem;
1212
13//! PBKDF2 (Password-Based Key Derivation Function 2) is a specific Key Derivation Function,
14//! intended to turn a weak, human generated password into a strong key, suitable for cryptographic
15//! uses. It does this by salting and stretching the password. Salting injects non-secret random
16//! data, so that identical passwords will be converted into unique keys. Stretching applies a
17//! deliberately slow hashing function to frustrate brute-force guessing.
13//! PBKDF2 (Password-Based Key Derivation Function 2) is intended to turn a weak, human generated
14//! password into a strong key, suitable for cryptographic uses. It does this by salting and
15//! stretching the password. Salting injects non-secret random data, so that identical passwords
16//! will be converted into unique keys. Stretching applies a deliberately slow hashing function to
17//! frustrate brute-force guessing.
1818//!
1919//! PBKDF2 is defined in RFC 2898, and is a recommendation of NIST SP 800-132.
2020
......@@ -46,8 +46,7 @@ const mem = std.mem;
4646
4747// Based on Apple's CommonKeyDerivation, based originally on code by Damien Bergamini.
4848
49/// Given a password, salt, iteration count (rounds), and a pseudo-random function, generates a
50/// derived key in the provided buffer slice.
49/// Apply PBKDF2 to generate a key from a password.
5150///
5251/// derivedKey: Slice of appropriate size for generated key. Generally 16 or 32 bytes in length.
5352/// May be uninitialized. All bytes will be written.