We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cdfe0b8 commit afd2d9dCopy full SHA for afd2d9d
fizz/crypto/aead/AEGISCipher.cpp
@@ -325,14 +325,14 @@ folly::Optional<std::unique_ptr<folly::IOBuf>> AEGISCipher::tryDecrypt(
325
// Set up the tag buffer now
326
const auto& lastBuf = ciphertext->prev();
327
folly::MutableByteRange tagOut;
328
+ std::array<uint8_t, kTagLength> tag;
329
if (lastBuf->length() >= tagLength_) {
330
// We can directly carve out this buffer from the last IOBuf
331
// Adjust buffer sizes
332
lastBuf->trimEnd(tagLength_);
333
334
tagOut = {lastBuf->writableTail(), tagLength_};
335
} else {
- std::array<uint8_t, kTagLength> tag;
336
// buffer to copy the tag into when we decrypt
337
tagOut = {tag.data(), tagLength_};
338
trimBytes(*ciphertext, tagOut);
0 commit comments