Password Based Key Derrivation Function (PBKDF2)
Password based key derivation function PBKDF2 as defined in RFC
8018 (PKCS #5 v2.1).
A key derivation function is useful when encrypting data based on a password
or any other not-fully-random data. It uses a pseudorandom function to derive a
secure encryption key based on the password.
The key is
derived based on the method described as PBKDF2 with the HMAC variant using
the supplied hash function.
Remember to get a good random salt. At least 8 bytes is recommended by the
RFC.
Using a higher iteration count will increase the cost of an exhaustive
search but will also make derivation proportionally slower.
keyLength must be a positive integer
Generate a key using the SHA1 hashing function.
Password:
Salt:
Iterations:
Key Length:
PBKDF2_SHA1 Result:
Generate a key using the SHA256 hashing function.
Password:
Salt:
Iterations:
Key Length:
PBKDF2_SHA256 Result:
Generate a key using the SHA512 hashing function.