KeyPairGenerator.getInstance

KeyPairGenerator.getInstance

Class Overview | Class Members | This Package | All Packages

Syntax 1
public static KeyPairGenerator getInstance( String algorithm ) throws NoSuchAlgorithmException
Parameters
algorithm
the standard string name of the algorithm. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
Returns
the new KeyPairGenerator object.
Description
Generates a KeyPairGenerator object that implements the algorithm requested, as available in the environment.

Exceptions
NoSuchAlgorithmException if the algorithm is not available in the environment.



Syntax 2
public static KeyPairGenerator getInstance( String algorithm, String provider ) throws NoSuchAlgorithmException, NoSuchProviderException
Parameters
algorithm
the standard string name of the algorithm. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
provider
the string name of the provider.
Returns
the new KeyPairGenerator object.
Description
Generates a KeyPairGenerator object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.

Exceptions
NoSuchAlgorithmException if the algorithm is not available from the provider.
Exceptions
NoSuchProviderException if the provider is not available in the environment.
See Also
Provider