public static final int TAG_LENGTH = 128;
public static Pbkdf2 pbkdf2() {
try {
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(PBKDF2_ALGORITHM);
return new DefaultPbkdf2(keyFactory);
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException(e);
}
}