public class KeystoreEncryptionSpi extends IgniteSpiAdapter implements EncryptionSpi
EncryptionSpi, 
KeystoreEncryptionKey| Modifier and Type | Field and Description | 
|---|---|
static String | 
CIPHER_ALGO
Algorithm supported by implementation. 
 | 
static int | 
DEFAULT_KEY_SIZE
Default encryption key size; 
 | 
static String | 
DEFAULT_MASTER_KEY_NAME
Default key store entry name to store Encryption master key. 
 | 
protected Ignite | 
ignite
Ignite 
 | 
protected IgniteLogger | 
log
Logger. 
 | 
igniteInstanceName| Constructor and Description | 
|---|
KeystoreEncryptionSpi()  | 
| Modifier and Type | Method and Description | 
|---|---|
int | 
blockSize() | 
KeystoreEncryptionKey | 
create()
Creates new key for an encryption/decryption of cache persistent data: pages, WAL records. 
 | 
byte[] | 
decrypt(byte[] data,
       Serializable key)
Decrypts data encrypted with  
EncryptionSpi.encrypt(ByteBuffer, Serializable, ByteBuffer) | 
KeystoreEncryptionKey | 
decryptKey(byte[] data)
Decrypts key and checks it integrity. 
 | 
void | 
decryptNoPadding(ByteBuffer data,
                Serializable key,
                ByteBuffer res)
Decrypts data encrypted with  
EncryptionSpi.encryptNoPadding(ByteBuffer, Serializable, ByteBuffer) | 
void | 
encrypt(ByteBuffer data,
       Serializable key,
       ByteBuffer res)
Encrypts data. 
 | 
int | 
encryptedSize(int dataSize) | 
int | 
encryptedSizeNoPadding(int dataSize) | 
byte[] | 
encryptKey(Serializable key)
Encrypts key. 
 | 
void | 
encryptNoPadding(ByteBuffer data,
                Serializable key,
                ByteBuffer res)
Encrypts data without padding info. 
 | 
int | 
getKeySize()
Gets encryption key size. 
 | 
String | 
getKeyStorePath()
Gets path to jdk keyStore that stores master key. 
 | 
char[] | 
getKeyStorePwd()
Gets key store password. 
 | 
String | 
getMasterKeyName()
Gets master key name. 
 | 
byte[] | 
masterKeyDigest()
Returns master key digest. 
 | 
void | 
setKeySize(int keySize)
Sets encryption key size. 
 | 
void | 
setKeyStorePassword(char[] keyStorePassword)
Sets password to access KeyStore. 
 | 
void | 
setKeyStorePath(String keyStorePath)
Sets path to jdk keyStore that stores master key. 
 | 
void | 
setMasterKeyName(String masterKeyName)
Sets mater key name. 
 | 
void | 
spiStart(@Nullable String igniteInstanceName)
This method is called to start SPI. 
 | 
void | 
spiStop()
This method is called to stop SPI. 
 | 
addTimeoutObject, assertParameter, checkConfigurationConsistency0, clientFailureDetectionTimeout, configInfo, createSpiAttributeName, failureDetectionTimeout, failureDetectionTimeoutEnabled, failureDetectionTimeoutEnabled, getConsistentAttributeNames, getExceptionRegistry, getLocalNode, getName, getNodeAttributes, getSpiContext, ignite, initFailureDetectionTimeout, injectables, injectResources, isNodeStopping, onBeforeStart, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextDestroyed0, onContextInitialized, onContextInitialized0, registerMBean, removeTimeoutObject, setName, started, startInfo, startStopwatch, stopInfo, unregisterMBeanclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, getNodeAttributes, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextInitializedpublic static final String DEFAULT_MASTER_KEY_NAME
public static final String CIPHER_ALGO
public static final int DEFAULT_KEY_SIZE
@LoggerResource protected IgniteLogger log
@IgniteInstanceResource protected Ignite ignite
public void spiStart(@Nullable
                     @Nullable String igniteInstanceName)
              throws IgniteSpiException
spiStart in interface IgniteSpiigniteInstanceName - Name of Ignite instance this SPI is being started for
    (null for default Ignite instance).IgniteSpiException - Throws in case of any error during SPI start.public void spiStop()
             throws IgniteSpiException
Note that this method can be called at any point including during recovery of failed start. It should make no assumptions on what state SPI will be in when this method is called.
spiStop in interface IgniteSpiIgniteSpiException - Thrown in case of any error during SPI stop.public byte[] masterKeyDigest()
masterKeyDigest in interface EncryptionSpipublic KeystoreEncryptionKey create() throws IgniteException
create in interface EncryptionSpiIgniteException - If key creation failed.public void encrypt(ByteBuffer data, Serializable key, ByteBuffer res)
encrypt in interface EncryptionSpidata - Data to encrypt.key - Encryption key.res - Destination buffer.public void encryptNoPadding(ByteBuffer data, Serializable key, ByteBuffer res)
encryptNoPadding in interface EncryptionSpidata - Data to encrypt.key - Encryption key.res - Destination buffer.public byte[] decrypt(byte[] data,
                      Serializable key)
EncryptionSpi.encrypt(ByteBuffer, Serializable, ByteBuffer)decrypt in interface EncryptionSpidata - Data to decrypt.key - Encryption key.public void decryptNoPadding(ByteBuffer data, Serializable key, ByteBuffer res)
EncryptionSpi.encryptNoPadding(ByteBuffer, Serializable, ByteBuffer)decryptNoPadding in interface EncryptionSpidata - Data to decrypt.key - Encryption key.public byte[] encryptKey(Serializable key)
encryptKey in interface EncryptionSpikey - Key to encrypt.public KeystoreEncryptionKey decryptKey(byte[] data)
decryptKey in interface EncryptionSpidata - Key to decrypt.public int encryptedSize(int dataSize)
encryptedSize in interface EncryptionSpidataSize - Size of plain data in bytes.public int encryptedSizeNoPadding(int dataSize)
encryptedSizeNoPadding in interface EncryptionSpidataSize - Size of plain data in bytes.public int blockSize()
blockSize in interface EncryptionSpipublic String getKeyStorePath()
public void setKeyStorePath(String keyStorePath)
keyStorePath - Path to JDK KeyStore.public char[] getKeyStorePwd()
public void setKeyStorePassword(char[] keyStorePassword)
keyStorePassword - Password for Key Store.public int getKeySize()
public void setKeySize(int keySize)
keySize - Key size.public String getMasterKeyName()
public void setMasterKeyName(String masterKeyName)
masterKeyName - Master key name.                                     
                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                 Follow @ApacheIgnite                                                                                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                     Ignite Database and Caching Platform                                                                                                                   :                                                               ver. 2.7.2                                                                                                                                                                                                                                                                                                                                    Release Date                                                                                                                   :                                                               February 6 2019