gnu.crypto.auth.callback
final class Engine extends Object
These classes (java.security.Signature for example) can be thought of as the "chrome, upholstery, and steering wheel", and the SPI (service provider interface, e.g. java.security.SignatureSpi) classes can be thought of as the "engine" -- providing the actual functionality of whatever cryptographic algorithm the instance represents.
See Also: Provider
Method Summary | |
---|---|
static Object | getInstance(String service, String algorithm, Provider provider)
Get the implementation for algorithm for service
service from provider. |
static Object | getInstance(String service, String algorithm, Provider provider, Object[] initArgs)
Get the implementation for algorithm for service
service from provider, passing initArgs to the
SPI class's constructor (which cannot be null; pass a zero-length
array if the SPI takes no arguments). |
Parameters: service The service name. algorithm The name of the algorithm to get. provider The provider to get the implementation from.
Returns: The engine class for the specified algorithm; the object returned is typically a subclass of the SPI class for that service, but callers should check that this is so.
Throws: NoSuchAlgorithmException If the implementation cannot be found or cannot be instantiated. InvocationTargetException If the SPI class's constructor throws an exception. IllegalArgumentException If any of the three arguments are null.
Parameters: service The service name. algorithm The name of the algorithm to get. provider The provider to get the implementation from. initArgs The arguments to pass to the SPI class's constructor (cannot be null).
Returns: The engine class for the specified algorithm; the object returned is typically a subclass of the SPI class for that service, but callers should check that this is so.
Throws: NoSuchAlgorithmException If the implementation cannot be found or cannot be instantiated. InvocationTargetException If the SPI class's constructor throws an exception. IllegalArgumentException If any of the four arguments are null.