I'm not sure if it is too late, but to add BountyCastle to your project, you simply add this to the class that your going to be doing encryption in:
static {
Security.addProvider(new org.spongycastle.jce.provider.BouncyCastleProvider());
}
Here is an example:
import java.security.SecureRandom;
import java.security.Security;
public class SHA1PRNG {
//here i swapped out the bountycastle provider and used the spongycatle
static {
Security.addProvider(new org.spongycastle.jce.provider.BouncyCastleProvider());
}
public static void main(String[] args) throws Exception {
SecureRandom rng = SecureRandom.getInstance("SHA1PRNG");
rng.setSeed(711);
int numberToGenerate = 999;
byte randNumbers[] = new byte[numberToGenerate];
rng.nextBytes(randNumbers);
for(int j=0; j<numberToGenerate; j++) {
System.out.print(randNumbers[j] + " ");
}
}
}
From:
www.java2s.com/Code/Java/Security/SecureRandomSHA1PRNG.htm