Package com.couchbase.client.encryption
Class CryptoManager
java.lang.Object
com.couchbase.client.encryption.CryptoManager
public class CryptoManager extends Object
Encryption configuration manager set on the couchbase environment for encryption/decryption
- Since:
- 1.0.0
- Author:
- Subhashni Balakrishnan
-
Constructor Summary
Constructors Constructor Description CryptoManager()
Creates an instance of Encryption configuration -
Method Summary
Modifier and Type Method Description CryptoProvider
getProvider(String name)
Get an encryption algorithm providervoid
registerProvider(String name, CryptoProvider provider)
Add an encryption algorithm providervoid
throwMissingPublicKeyEx(String alias)
Private interface to workaround eager loading of exception classes in JVM throws the required public key missing exceptionvoid
throwSigningFailedEx(String alias)
Private interface to workaround eager loading of exception classes in JVM throws the required Signing failed exception
-
Constructor Details
-
CryptoManager
public CryptoManager()Creates an instance of Encryption configuration
-
-
Method Details
-
registerProvider
Add an encryption algorithm provider- Parameters:
name
- an alias name for the encryption providerprovider
- Encryption provider implementation- Throws:
Exception
- if the alias name is null or empty
-
getProvider
Get an encryption algorithm provider- Parameters:
name
- an alias name for the encryption provider- Returns:
- encryption crypto provider instance
- Throws:
Exception
- if the alias is null or empty or not configured
-
throwMissingPublicKeyEx
Private interface to workaround eager loading of exception classes in JVM throws the required public key missing exception- Parameters:
alias
- the alias name for the provider- Throws:
Exception
- always
-
throwSigningFailedEx
Private interface to workaround eager loading of exception classes in JVM throws the required Signing failed exception- Parameters:
alias
- the alias name for the provider- Throws:
Exception
- always
-