java.lang.Object
com.pervasive.datarush.encryption.EncryptionManager
A manager of EncryptionProvider's. Within a JVM, there is a single, static
currentEncryptor that is used when performing
encryption of sensitive information. The
currentEncryptor may be globally set by setting the
currentEncryptorId. Within a JVM,
there can be multiple providers that are used
when performing decryption.
This model allows for the encryption strategy to evolve over time while
always being able to read files written by previous
EncryptionProvider's.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the encryptor to use when encrypting.Gets the id of theEncryptionProviderto use when encrypting.static EncryptionManagerReturns the single instance of this class.getProvider(String id) Returns the provider whoseproviderIDmatches that given.voidSets the id of theEncryptionProviderto use when encrypting.
-
Method Details
-
getInstance
Returns the single instance of this class.- Returns:
- the single instance of this class
-
getProvider
Returns the provider whoseproviderIDmatches that given.- Parameters:
id- the providerID- Returns:
- the matching provider
- Throws:
IllegalArgumentException- if no provider was found that matches the given ID
-
setCurrentEncryptorId
Sets the id of theEncryptionProviderto use when encrypting. By default this is set toDefaultEncryptionProvider.ID.- Parameters:
id- the encryptor id- Throws:
IllegalArgumentException- if the given provider is not registered
-
getCurrentEncryptorId
Gets the id of theEncryptionProviderto use when encrypting. By default this is set toDefaultEncryptionProvider.ID.- Returns:
- the encryptor id
-
getCurrentEncryptor
Returns the encryptor to use when encrypting. By default this is aDefaultEncryptionProvider.- Returns:
- the encryptor to use when encrypting.
-