public class DecryptorV2 extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DecryptorV2.ContentKey |
static interface |
DecryptorV2.DecryptSuccessCallback |
| Constructor and Description |
|---|
DecryptorV2(PibKey credentialsKey,
Validator validator,
KeyChain keyChain,
Face face)
Create a DecryptorV2 with the given parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
decrypt(EncryptedContent encryptedContent,
DecryptorV2.DecryptSuccessCallback onSuccess,
EncryptError.OnError onError)
Asynchronously decrypt the encryptedContent.
|
void |
shutdown() |
public DecryptorV2(PibKey credentialsKey, Validator validator, KeyChain keyChain, Face face)
credentialsKey - The credentials key to be used to retrieve and
decrypt the KDK.validator - The validation policy to ensure the validity of the KDK
and CK.keyChain - The KeyChain that will be used to decrypt the KDK.face - The Face that will be used to fetch the CK and KDK.public void shutdown()
public final void decrypt(EncryptedContent encryptedContent, DecryptorV2.DecryptSuccessCallback onSuccess, EncryptError.OnError onError) throws IOException
encryptedContent - The EncryptedContent to decrypt, which must have
a KeyLocator with a KEYNAME and and initial vector. This does not copy
the EncryptedContent object. If you may change it later, then pass in a
copy of the object.onSuccess - On successful decryption, this calls
onSuccess.onSuccess(plainData) where plainData is the decrypted Blob.
NOTE: The library will log any exceptions thrown by this callback, but for
better error handling the callback should catch and properly handle any
exceptions.onError - On failure, this calls onError.onError(errorCode, message)
where errorCode is from the EncryptError.ErrorCode enum, and message is an
error string.
NOTE: The library will log any exceptions thrown by this callback, but for
better error handling the callback should catch and properly handle any
exceptions.IOExceptionCopyright © 2019. All rights reserved.