public interface EncryptionSpi extends IgniteSpi
Modifier and Type | Method and Description |
---|---|
int |
blockSize() |
Serializable |
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
encrypt(ByteBuffer, Serializable, ByteBuffer) |
Serializable |
decryptKey(byte[] key)
Decrypts key and checks it integrity.
|
Serializable |
decryptKey(byte[] key,
String masterKeyName)
Decrypts key and checks its integrity using the master key specified by name.
|
void |
decryptNoPadding(ByteBuffer data,
Serializable key,
ByteBuffer res)
Decrypts data encrypted with
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.
|
byte[] |
encryptKey(Serializable key,
String masterKeyName)
Encrypts a key with the master key specified by name.
|
void |
encryptNoPadding(ByteBuffer data,
Serializable key,
ByteBuffer res)
Encrypts data without padding info.
|
String |
getMasterKeyName()
Gets the current master key name.
|
byte[] |
masterKeyDigest()
Returns master key digest.
|
byte[] |
masterKeyDigest(String masterKeyName)
Returns master key digest by name.
|
void |
setMasterKeyName(String masterKeyName)
Sets master key Name that will be used for keys encryption in
encryptKey(Serializable) and decryptKey(byte[]) methods and in the masterKeyDigest() method. |
getName, getNodeAttributes, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextInitialized, spiStart, spiStop
byte[] masterKeyDigest()
byte[] masterKeyDigest(String masterKeyName)
masterKeyName
- Master key name.Serializable create() throws IgniteException
IgniteException
- If key creation failed.void encrypt(ByteBuffer data, Serializable key, ByteBuffer res)
data
- Data to encrypt.key
- Encryption key.res
- Destination buffer.void encryptNoPadding(ByteBuffer data, Serializable key, ByteBuffer res)
data
- Data to encrypt.key
- Encryption key.res
- Destination buffer.byte[] decrypt(byte[] data, Serializable key)
encrypt(ByteBuffer, Serializable, ByteBuffer)
data
- Data to decrypt.key
- Encryption key.void decryptNoPadding(ByteBuffer data, Serializable key, ByteBuffer res)
encryptNoPadding(ByteBuffer, Serializable, ByteBuffer)
data
- Data to decrypt.key
- Encryption key.res
- Destination of the decrypted data.byte[] encryptKey(Serializable key)
key
- Key to encrypt.byte[] encryptKey(Serializable key, String masterKeyName)
key
- Key to encrypt.masterKeyName
- Master key name.Serializable decryptKey(byte[] key)
key
- Key to decrypt.Serializable decryptKey(byte[] key, String masterKeyName)
key
- Key to decrypt.masterKeyName
- Master key name.int encryptedSize(int dataSize)
dataSize
- Size of plain data in bytes.int encryptedSizeNoPadding(int dataSize)
dataSize
- Size of plain data in bytes.int blockSize()
String getMasterKeyName()
setMasterKeyName(String)
void setMasterKeyName(String masterKeyName) throws IgniteSpiException
encryptKey(Serializable)
and decryptKey(byte[])
methods and in the masterKeyDigest()
method.masterKeyName
- Master key name.IgniteSpiException
- In case of error.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.16.0 Release Date : December 15 2023