Skip to content

Instantly share code, notes, and snippets.

@derveloper
Created October 26, 2016 20:56
Show Gist options
  • Save derveloper/a9f4463b4553a2a7770b42bf5183e36a to your computer and use it in GitHub Desktop.
Save derveloper/a9f4463b4553a2a7770b42bf5183e36a to your computer and use it in GitHub Desktop.
import com.sun.crypto.provider.DHKeyPairGenerator;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
public class DHKeyTest
{
public static void main(String[] args) throws NoSuchAlgorithmException
{
final DHKeyPairGenerator dhKeyPairGenerator = new DHKeyPairGenerator();
dhKeyPairGenerator.initialize(4096, SecureRandom.getInstanceStrong());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment