Returns a javax.crypto.Cipher object instance initialized for the specified operation.
Syntax
Cipher
getCipher
(
String
profileName
,
String
operation
) throws SecException
Parameters
-
profileName –
-
operation –
that will be performed using the returned Cipher object. Valid values are Const.OP_ENCRYPT and Const.OP_DECRYPT
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
Cipher to perform the specified operation.