Skip to content

Commit

Permalink
Rename _iv_prefix_len to _start_offset to make it match underlying fu…
Browse files Browse the repository at this point in the history
…nc parameter (#283)
  • Loading branch information
artemgavrilov authored Sep 17, 2024
1 parent 0a2f4e9 commit 4197530
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/include/encryption/enc_tde.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ PGTdePageAddItemExtended(RelFileLocator rel, Oid oid, BlockNumber bn, Page page,

/* Function Macros over crypt */

#define PG_TDE_ENCRYPT_DATA(_iv_prefix, _iv_prefix_len, _data, _data_len, _out, _key) \
pg_tde_crypt(_iv_prefix, _iv_prefix_len, _data, _data_len, _out, _key, "ENCRYPT")
#define PG_TDE_ENCRYPT_DATA(_iv_prefix, _start_offset, _data, _data_len, _out, _key) \
pg_tde_crypt(_iv_prefix, _start_offset, _data, _data_len, _out, _key, "ENCRYPT")

#define PG_TDE_DECRYPT_DATA(_iv_prefix, _iv_prefix_len, _data, _data_len, _out, _key) \
pg_tde_crypt(_iv_prefix, _iv_prefix_len, _data, _data_len, _out, _key, "DECRYPT")
#define PG_TDE_DECRYPT_DATA(_iv_prefix, _start_offset, _data, _data_len, _out, _key) \
pg_tde_crypt(_iv_prefix, _start_offset, _data, _data_len, _out, _key, "DECRYPT")

#define PG_TDE_DECRYPT_TUPLE(_tuple, _out_tuple, _key) \
pg_tde_crypt_tuple(_tuple, _out_tuple, _key, "DECRYPT-TUPLE")
Expand All @@ -47,9 +47,9 @@ PGTdePageAddItemExtended(RelFileLocator rel, Oid oid, BlockNumber bn, Page page,
pg_tde_crypt_tuple(_tuple, _out_tuple, _key, _msg_context); \
} while(0)

#define PG_TDE_ENCRYPT_PAGE_ITEM(_iv_prefix, _iv_prefix_len, _data, _data_len, _out, _key) \
#define PG_TDE_ENCRYPT_PAGE_ITEM(_iv_prefix, _start_offset, _data, _data_len, _out, _key) \
do { \
pg_tde_crypt(_iv_prefix, _iv_prefix_len, _data, _data_len, _out, _key, "ENCRYPT-PAGE-ITEM"); \
pg_tde_crypt(_iv_prefix, _start_offset, _data, _data_len, _out, _key, "ENCRYPT-PAGE-ITEM"); \
} while(0)

extern void AesEncryptKey(const TDEPrincipalKey *principal_key, const RelFileLocator *rlocator, RelKeyData *rel_key_data, RelKeyData **p_enc_rel_key_data, size_t *enc_key_bytes);
Expand Down

0 comments on commit 4197530

Please sign in to comment.