Skip to content

Commit

Permalink
EaR: Update encryption methods to make 'cipherHeaderKey' optional
Browse files Browse the repository at this point in the history
Description

Fix file formatting

Testing
  • Loading branch information
sfc-gh-ahusain committed Feb 15, 2023
1 parent ff937a9 commit a116b1e
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions fdbserver/include/fdbserver/IPager.h
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,7 @@ class ArenaPage : public ReferenceCounted<ArenaPage>, public FastAllocated<Arena
}

// Get the logical page buffer as a StringRef
Standalone<StringRef> asStringRef() const {
return Standalone<StringRef>(StringRef(buffer, logicalSize));
}
Standalone<StringRef> asStringRef() const { return Standalone<StringRef>(StringRef(buffer, logicalSize)); }

// Get a new ArenaPage that contains a copy of this page's data.
// extra is not copied to the returned page
Expand Down Expand Up @@ -626,14 +624,10 @@ class ArenaPage : public ReferenceCounted<ArenaPage>, public FastAllocated<Arena
}
}

const Arena& getArena() const {
return arena;
}
const Arena& getArena() const { return arena; }

// Returns true if the page's encoding type employs encryption
bool isEncrypted() const {
return isEncodingTypeEncrypted(getEncodingType());
}
bool isEncrypted() const { return isEncodingTypeEncrypted(getEncodingType()); }

// Return encryption domain id used. This method only use information from the encryptionKey.
// Caller should make sure encryption domain is in use.
Expand All @@ -647,9 +641,7 @@ class ArenaPage : public ReferenceCounted<ArenaPage>, public FastAllocated<Arena
}

// Return pointer to encoding header.
const void* getEncodingHeader() const {
return encodingHeaderAvailable ? page->getEncodingHeader() : nullptr;
}
const void* getEncodingHeader() const { return encodingHeaderAvailable ? page->getEncodingHeader() : nullptr; }

private:
Arena arena;
Expand All @@ -676,9 +668,7 @@ class ArenaPage : public ReferenceCounted<ArenaPage>, public FastAllocated<Arena
int payloadSize;

public:
EncodingType getEncodingType() const {
return page->encodingType;
}
EncodingType getEncodingType() const { return page->encodingType; }

PhysicalPageID getPhysicalPageID() const {
if (page->headerVersion == 1) {
Expand Down

0 comments on commit a116b1e

Please sign in to comment.