Returns a javax.crypto.Cipher object instance initialized for the specified operation.
Syntax
Cipher
getCipher
(
String
profileName
,
Operation
operation
,
AlgorithmParameters
params
) throws SecException
Parameters
-
profileName –
-
operation –
that will be performed using the returned Cipher object. Valid values are Operation.ENCRYPT and Operation.DECRYPT.
-
params –
JCE algorithm parameters that should be supplied when initializing the cipher. An example of the type of data that can be included is the IV data.
Returns
Cipher to perform the specified operation.
Exceptions
-
IllegalStateException –
if the specified profile requires a role to access and there is no current authenticated subject or if the context has been destroyed.
-
SecException class –
if no profile with the specified profile name exists or if the specified profile requires a role to access and if the authenticated subject is not in that role. Or if none of the configured SecureDataService providers can handle the request.
-
IllegalArgumentException –
if the specified value for operation parameter is not valid.
Usage
The supplied AlgorithmParameters object is used to complete initialization of the Cipher.
Cipher to perform the specified operation.