|
iceberg-cpp
|
AES GCM Stream format constants. More...
#include <aes_gcm_stream.h>
Static Public Member Functions | |
| static ICEBERG_BUNDLE_EXPORT Result< int64_t > | PlaintextLength (int64_t encrypted_length) |
| Plaintext length of a stream with the given encrypted length. | |
Static Public Attributes | |
| static constexpr int32_t | kPlainBlockSize = 1024 * 1024 |
| static constexpr int32_t | kNonceLength = 12 |
| static constexpr int32_t | kGcmTagLength = 16 |
| static constexpr int32_t | kCipherBlockSize |
| static constexpr std::array< char, 4 > | kMagic = {'A', 'G', 'S', '1'} |
| static constexpr int32_t | kHeaderLength = 8 |
| static constexpr int64_t | kMinStreamLength |
AES GCM Stream format constants.
AGS1 stores the block length in its header. This implementation only reads and writes 1 MiB blocks, matching Java, rather than supporting other block lengths.
For Java compatibility, an empty file contains one zero-length plaintext block with a nonce and tag. The AGS1 spec describes a non-empty last block and does not explicitly define this empty-file representation.
|
static |
Plaintext length of a stream with the given encrypted length.
Returns an error if the length is shorter than an empty stream, implies more than int32 max blocks, or ends in a block too short to hold a nonce and tag.
|
staticconstexpr |
|
staticconstexpr |