- java.lang.Object
-
- com.pervasive.datarush.encryption.DefaultEncryptionProvider
-
- All Implemented Interfaces:
EncryptionProvider
public final class DefaultEncryptionProvider extends Object implements EncryptionProvider
The default encryption provider. This provides a basic level of encryption for sensitive data using a hard-coded key.
-
-
Constructor Summary
Constructors Constructor Description DefaultEncryptionProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
decrypt(String string)
Decrypts a given string.String
encrypt(String string)
Encrypts the given string.String
getProviderID()
Returns a unique identifier for this provider
-
-
-
Field Detail
-
ID
public static final String ID
The default encryption provider ID: "default"- See Also:
- Constant Field Values
-
-
Method Detail
-
getProviderID
public String getProviderID()
Description copied from interface:EncryptionProvider
Returns a unique identifier for this provider- Specified by:
getProviderID
in interfaceEncryptionProvider
- Returns:
- the unique identifer for this provider
-
encrypt
public String encrypt(String string)
Description copied from interface:EncryptionProvider
Encrypts the given string. The encrypted form may consist of any string format.- Specified by:
encrypt
in interfaceEncryptionProvider
- Parameters:
string
- the clear text- Returns:
- the encrypted text
-
decrypt
public String decrypt(String string)
Description copied from interface:EncryptionProvider
Decrypts a given string. This method must be able to decrypt any string produced byEncryptionProvider.encrypt(String)
.- Specified by:
decrypt
in interfaceEncryptionProvider
- Parameters:
string
- the string to decrypt- Returns:
- the clear text
-
-