jodd-core/src/main/java/jodd/crypt/PBKDF2Hash.java
public String createHash(final char[] password) {

		// Generate a random salt
		SecureRandom random = new SecureRandom();
		byte[] salt = new byte[saltBytes];
		random.nextBytes(salt);

		// Hash the password
		byte[] hash = pbkdf2(password, salt, pbkdf2Iterations, hashBytes);

		// format iterations:salt:hash
		return pbkdf2Iterations + ":" + StringUtil.toHexString(salt) + ":" + StringUtil.toHexString(hash);
	}
public String createHash(final char[] password) {

		// Generate a random salt
		SecureRandom random = new SecureRandom();
		byte[] salt = new byte[saltBytes];
		random.nextBytes(salt);

		// Hash the password
		byte[] hash = pbkdf2(password, salt, pbkdf2Iterations, hashBytes);

		// format iterations:salt:hash
		return pbkdf2Iterations + ":" + StringUtil.toHexString(salt) + ":" + StringUtil.toHexString(hash);
	}
public String createHash ( final char [ ] password ) { // Generate a random salt SecureRandom random = new SecureRandom ( ) ; byte [ ] salt = new byte [ saltBytes ] ; random . nextBytes ( salt ) ; // Hash the password byte [ ] hash = pbkdf2 ( password , salt , pbkdf2Iterations , hashBytes ) ; // format iterations:salt:hash return pbkdf2Iterations + ":" + StringUtil . toHexString ( salt ) + ":" + StringUtil . toHexString ( hash ) ; }
Returns a salted PBKDF2 hash of the password.

@param password the password to hash
@return a salted PBKDF2 hash of the password
Returns a salted PBKDF2 hash of the password .