code: @Nonnull
    protected static final byte [] pbkdf2 (@Nonnull final char [] aPassword,
                                           @Nonnull final byte [] aSalt,
                                           @Nonnegative final int nIterations,
                                           @Nonnegative final int nBytes)
    {
      try
      {
        final PBEKeySpec spec = new PBEKeySpec (aPassword, aSalt, nIterations, nBytes * CGlobal.BITS_PER_BYTE);
        final SecretKeyFactory skf = SecretKeyFactory.getInstance (PBKDF2_ALGORITHM);
        return skf.generateSecret (spec).getEncoded ();
      }
      catch (final GeneralSecurityException ex)
      {
        throw new IllegalStateException ("Failed to apply PBKDF2 algorithm", ex);
      }
    }
docs: Computes the PBKDF2 hash of a password.
  
  @param aPassword
  the password to hash.
  @param aSalt
  the salt
  @param nIterations
  the iteration count (slowness factor)
  @param nBytes
  the length of the hash to compute in bytes
  @return the PBDKF2 hash of the password