public String createHash(char[] password){
  SecureRandom random=new SecureRandom();
  byte[] salt=new byte[saltBytes];
  random.nextBytes(salt);
  byte[] hash=pbkdf2(password,salt,pbkdf2Iterations,hashBytes);
  return pbkdf2Iterations + ":" + toHex(salt)+ ":"+ toHex(hash);
}

public String createHash ( char [ ] password ) { SecureRandom random = new SecureRandom ( ) ; byte [ ] salt = new byte [ saltBytes ] ; random . nextBytes ( salt ) ; byte [ ] hash = pbkdf2 ( password , salt , pbkdf2Iterations , hashBytes ) ; return pbkdf2Iterations + ":" + toHex ( salt ) + ":" + toHex ( hash ) ; }
returns a salted pbkdf2 hash of the password .
