Package com.couchbase.client.encryption
Interface KeyStoreProvider
public interface KeyStoreProvider
Key provider interface for key store implementation.
- Since:
- 0.1.0
- Author:
- Subhashni Balakrishnan
-
Method Summary
Modifier and Type Method Description byte[]
getKey(String keyName)
Internally used by crypto providers to retrieve the key for encryption/decryption.String
privateKeyName()
Get the private key name setvoid
privateKeyName(String name)
Set the private key name required for an asymmetic cryptographic algorithmString
publicKeyName()
Get the name of the encryption keyvoid
publicKeyName(String name)
Set the name of the encryption keyString
signingKeyName()
Get the signing key name/password setvoid
signingKeyName(String name)
Set signing key name/passwordvoid
storeKey(String keyName, byte[] key)
Add a key
-
Method Details
-
getKey
Internally used by crypto providers to retrieve the key for encryption/decryption.- Parameters:
keyName
- The key to be retrieved for secret keys. Add suffix _public/_private to retrieve public/private key- Returns:
- key Key as raw bytes
- Throws:
Exception
- on failure
-
storeKey
Add a key- Parameters:
keyName
- Name of the keykey
- Secret key as byes- Throws:
Exception
- on failure
-
publicKeyName
String publicKeyName()Get the name of the encryption key- Returns:
- encryption key name
-
publicKeyName
Set the name of the encryption key- Parameters:
name
- encryption key
-
privateKeyName
String privateKeyName()Get the private key name set- Returns:
- private key name
-
privateKeyName
Set the private key name required for an asymmetic cryptographic algorithm- Parameters:
name
- private key name
-
signingKeyName
String signingKeyName()Get the signing key name/password set- Returns:
- name
-
signingKeyName
Set signing key name/password- Parameters:
name
- Signing key name
-