Convenience method to decrypt a buffer of data using srcProfile and encrypt it using destProfile in one step.
Syntax
byte[]
reencrypt
(
String
srcProfileName
,
String
destProfileName
,
byte[]
data
) throws SecException
Parameters
-
srcProfileName –
name of the profile to use for decrypting the data passed in
-
destProfileName –
name of the profile to use for encrypting the decrypted data
-
data –
data encrypted using srcProfileName
Returns
data decrypted using srcProfileName and encrypted using destProfileName
Exceptions
-
IllegalStateException –
if one of the profiles require a role to access and there is no current authenticated subject. Or if none of the configured SecureDataService providers can handle the request. Or if the context has been destroyed.
-
SecException class –
if no profiles with the specified names exist. Or one or both the specified profiles require a role to access and if the authenticated subject is not in that role.
Usage
data decrypted using srcProfileName and encrypted using destProfileName