Skip to content

Instantly share code, notes, and snippets.

View adityasatrio's full-sized avatar
👻
I may be slow to respond.

Aditya satrio nugroho adityasatrio

👻
I may be slow to respond.
View GitHub Profile
@adityasatrio
adityasatrio / PasswordUtils.java
Created August 19, 2016 08:03 — forked from ToastShaman/PasswordUtils.java
A utility class for hashing passwords using PBKDF2 with BouncyCastle.
package com.zuhlke.lsapi;
import org.bouncycastle.crypto.PBEParametersGenerator;
import org.bouncycastle.crypto.digests.SHA3Digest;
import org.bouncycastle.crypto.generators.PKCS5S2ParametersGenerator;
import org.bouncycastle.crypto.params.KeyParameter;
import org.bouncycastle.crypto.prng.DigestRandomGenerator;
import java.util.Base64;