MCPcopy Create free account
hub / github.com/apache/arrow / QuickUpdatePageAad

Function QuickUpdatePageAad

cpp/src/parquet/encryption/encryption_internal.cc:757–762  ·  view source on GitHub ↗

Update last two bytes with new page ordinal (instead of creating new page AAD from scratch)

Source from the content-addressed store, hash-verified

755// Update last two bytes with new page ordinal (instead of creating new page AAD
756// from scratch)
757void QuickUpdatePageAad(int32_t new_page_ordinal, std::string* AAD) {
758 CheckPageOrdinal(new_page_ordinal);
759 const std::string page_ordinal_bytes =
760 ShortToBytesLe(static_cast<int16_t>(new_page_ordinal));
761 std::memcpy(AAD->data() + AAD->length() - 2, page_ordinal_bytes.data(), 2);
762}
763
764void RandBytes(unsigned char* buf, size_t num) {
765 if (num > static_cast<size_t>(std::numeric_limits<int>::max())) {

Callers 2

UpdateDecryptionMethod · 0.50
UpdateEncryptionMethod · 0.50

Calls 4

CheckPageOrdinalFunction · 0.85
ShortToBytesLeFunction · 0.85
dataMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected