PBEKeySpec spec = new PBEKeySpec(password.toCharArray(), salt.getBytes(StandardCharsets.UTF_8), iterations, digestSize) SecretKeyFactory skf = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA256") byte[] hash = skf.generateSecret(spec).getEncoded()
well the biggest problem is probably generating a truly random salt with SecureRandom, which will slow down your program if used incorrect.
well the biggest problem is probably generating a truly random salt with SecureRandom, which will slow down your program if used incorrect.