Signature.getInstance

Signature.getInstance

Class Overview | Class Members | This Package | All Packages

Syntax 1
public static Signature getInstance( String algorithm ) throws NoSuchAlgorithmException
Parameters
algorithm
the standard name of the algorithm requested. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
Returns
the new Signature object.
Description
Generates a Signature object that implements the specified algorithm. If the default provider package contains a Signature subclass implementing the algorithm, an instance of that subclass is returned. If the algorithm is not available in the default package, other packages are searched.

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



Syntax 2
public static Signature getInstance( String algorithm, String provider ) throws NoSuchAlgorithmException, NoSuchProviderException
Parameters
algorithm
the name of the algorithm requested. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
provider
the name of the provider.
Returns
the new Signature object.
Description
Generates a Signature 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 in the package supplied by the requested provider.
Exceptions
NoSuchProviderException if the provider is not available in the environment.
See Also
Provider