Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
PBKDF2 Java sample
SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");
KeySpec keyspec = new PBEKeySpec("password".toCharArray(), salt, 1000, 128);
Key key = factory.generateSecret(keyspec);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment