Interface BlockCrypto
-
- All Known Implementing Classes:
AesGcmBlockCrypto
,NoOpBlockCrypto
public interface BlockCrypto
Defines a facility that can be used to encrypt and decrypt blocks.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
decrypt(EncryptionKey key, byte[] bytes)
Used to decrypt a Block's serialzied form.Block
decrypt(EncryptionKey key, byte[] bytes, org.apache.arrow.vector.types.pojo.Schema schema)
Used to decrypt and deserialize a Block from the provided bytes and schema.byte[]
encrypt(EncryptionKey key, Block block)
Used to encrypt the provided Block in its serialized form.
-
-
-
Method Detail
-
encrypt
byte[] encrypt(EncryptionKey key, Block block)
Used to encrypt the provided Block in its serialized form.- Parameters:
key
- The EncryptionKey to use when encrypting the Block.block
- The Block to serialize and encrypt.- Returns:
- The encrypted byte[] representation of the serialized Block, excluding its Schema.
-
decrypt
Block decrypt(EncryptionKey key, byte[] bytes, org.apache.arrow.vector.types.pojo.Schema schema)
Used to decrypt and deserialize a Block from the provided bytes and schema.- Parameters:
key
- The EncryptionKey to use when decrypting the Block.bytes
- The encrypted serialized form of the Block.schema
- The schema of the encrypted block- Returns:
- The Block.
-
decrypt
byte[] decrypt(EncryptionKey key, byte[] bytes)
Used to decrypt a Block's serialzied form.- Parameters:
key
- The EncryptionKey to use when decrypting the Block.bytes
- The encrypted serialized form of the Block.- Returns:
- The serialzied Block.
-
-