Maven module :un.api : api-encoding :
Class : un.impl.cryptography.kdf.PBKDF2
Extends/Implements : -
Subclasses : -

TODO : replace JVM api used here by public domain ones.
author  Thibaut Cuvelier


Variables : -
Functions : pbkdf2




PBKDF2 algorithm to generate keys from a password, based on SHA512. (RFC 2898.)

@param password The password from which the algorithm will derive one key; RFC 2898's P
@param salt The salt for the generation; RFC 2898's S
@param iterations The number of iterations to apply (the greater, the better security); RFC 2898's c
@param length The wanted length for the key (number of 8-bit bytes); RFC 2898's dkLen
@param hmacAlgorithm The HMAC algorithm to use
@return The generated key
@throws java.security.GeneralSecurityException The asked key length is too long.
public byte[] pbkdf2 (byte[] password, byte[] salt, int iterations, int length, String hmacAlgorithm)