Skip to content

Instantly share code, notes, and snippets.

View Yazan4m7's full-sized avatar

Yazan Abulaila Yazan4m7

View GitHub Profile
@Yazan4m7
Yazan4m7 / JavaPasswordSecurity.java
Created January 26, 2018 06:30 — forked from jtan189/JavaPasswordSecurity.java
Java PBKDF2 Password Hashing Code
import java.security.SecureRandom;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.SecretKeyFactory;
import java.math.BigInteger;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
/*
* PBKDF2 salted password hashing.
* Author: havoc AT defuse.ca