&& Security.getProvider("BC") == null) {
Provider bp = new org.bouncycastle.jce.provider.BouncyCastleProvider();
Security.addProvider(bp);
}
KeyPairGenerator generator = KeyPairGenerator.getInstance(
SOSKeyGenerator.keyAlgorithmName, SOSKeyGenerator.provider);
//SecureRandom random = SecureRandom.getInstance("SHA1PRNG",
// "SUN");
//initialize(int keysize, SecureRandom random)
generator.initialize(SOSKeyGenerator.keyLenght, new SecureRandom());
//generator.initialize(this.keyLenght);
KeyPair keys = generator.generateKeyPair();
return keys;
} catch (NoClassDefFoundError e) {
throw new Exception("no such Definition : " + e);
} catch (java.security.NoSuchProviderException e) {