public interface CryptoProvider
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkAlgorithmNameMatch(String name)
Check if the algorithm name is a match
|
byte[] |
decrypt(byte[] encrypted)
Decrypts the given data.
|
byte[] |
encrypt(byte[] data)
Encrypts the given data.
|
int |
getIVSize()
Get the initialization vector size that prepended to the encrypted bytes
|
KeyStoreProvider |
getKeyStoreProvider()
Get the key store provider set for the crypto provider use.
|
String |
getProviderAlgorithmName()
Get the crypto provider algorithm name
|
String |
getProviderName()
Deprecated.
|
byte[] |
getSignature(byte[] message)
Get the signature for the integrity check using the key given.
|
void |
setAlias(String alias)
Set the alias name on the provider
|
void |
setKeyStoreProvider(KeyStoreProvider provider)
Set the key store provider for the crypto provider to get keys from.
|
boolean |
verifySignature(byte[] message,
byte[] signature)
verify the signature for the integrity check.
|
KeyStoreProvider getKeyStoreProvider()
void setKeyStoreProvider(KeyStoreProvider provider)
provider - Key store providerbyte[] encrypt(byte[] data)
throws Exception
data - Data to be encryptedException - on failureint getIVSize()
byte[] decrypt(byte[] encrypted)
throws Exception
encrypted - Encrypted dataException - on failurebyte[] getSignature(byte[] message)
throws Exception
message - The message to check for correctnessException - on failureboolean verifySignature(byte[] message,
byte[] signature)
throws Exception
message - The message to check for correctnesssignature - Signature used for messageException - on failureString getProviderAlgorithmName()
@Deprecated String getProviderName()
boolean checkAlgorithmNameMatch(String name)
name - name to checkvoid setAlias(String alias)
alias - alias for the providerCopyright © 2015 Couchbase, Inc.