Class AesGcmBlockCrypto

  • All Implemented Interfaces:
    BlockCrypto

    public class AesGcmBlockCrypto
    extends Object
    implements BlockCrypto
    Implementation of BlockCrypto which uses AES-GCM for encrypting and decrypting blocks.
    See Also:
    BlockCrypto
    • Constructor Detail

      • AesGcmBlockCrypto

        public AesGcmBlockCrypto​(BlockAllocator allocator)
    • Method Detail

      • encrypt

        public byte[] encrypt​(EncryptionKey key,
                              Block block)
        Description copied from interface: BlockCrypto
        Used to encrypt the provided Block in its serialized form.
        Specified by:
        encrypt in interface BlockCrypto
        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

        public Block decrypt​(EncryptionKey key,
                             byte[] bytes,
                             org.apache.arrow.vector.types.pojo.Schema schema)
        Description copied from interface: BlockCrypto
        Used to decrypt and deserialize a Block from the provided bytes and schema.
        Specified by:
        decrypt in interface BlockCrypto
        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

        public byte[] decrypt​(EncryptionKey key,
                              byte[] bytes)
        Description copied from interface: BlockCrypto
        Used to decrypt a Block's serialzied form.
        Specified by:
        decrypt in interface BlockCrypto
        Parameters:
        key - The EncryptionKey to use when decrypting the Block.
        bytes - The encrypted serialized form of the Block.
        Returns:
        The serialzied Block.