|
iceberg-cpp
|
Per-file key metadata of the standard encryption scheme. More...
#include <standard_key_metadata.h>
Public Member Functions | |
| std::vector< uint8_t > | Serialize () const |
| Serialize to the version-prefixed Avro binary form. | |
| StandardKeyMetadata | WithFileLength (int64_t length) const |
| Return a copy with the given encrypted file length. | |
Static Public Member Functions | |
| static Result< StandardKeyMetadata > | Parse (std::span< const uint8_t > buffer) |
| Parse serialized key metadata. | |
Static Public Attributes | |
| static constexpr uint8_t | kV1 = 1 |
Friends | |
| bool | operator== (const StandardKeyMetadata &, const StandardKeyMetadata &)=default |
Per-file key metadata of the standard encryption scheme.
Stored in the key_metadata field of data files, delete files and manifest files, and (encrypted by a key encryption key) in the table metadata encryption-keys for manifest lists.
The Iceberg table spec leaves the key metadata representation to the encryption scheme; it mandates neither this encoding nor AES-GCM. The schema below follows Java's standard scheme.
The serialized form is compatible with Java's StandardKeyMetadata: a one-byte schema version (1) followed by an Avro binary encoded record with the fields encryption_key: bytes, aad_prefix: union{null, bytes} and file_length: union{null, long}.