Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1802)

Unified Diff: net/quic/crypto/aead_base_decrypter.h

Issue 2193073003: Move shared files in net/quic/ into net/quic/core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: io_thread_unittest.cc Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/spdy_utils_test.cc ('k') | net/quic/crypto/aead_base_decrypter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/aead_base_decrypter.h
diff --git a/net/quic/crypto/aead_base_decrypter.h b/net/quic/crypto/aead_base_decrypter.h
deleted file mode 100644
index ca5fa9c317a994a4daf0480fc46bcdd4ca32c2e5..0000000000000000000000000000000000000000
--- a/net/quic/crypto/aead_base_decrypter.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef NET_QUIC_CRYPTO_AEAD_BASE_DECRYPTER_H_
-#define NET_QUIC_CRYPTO_AEAD_BASE_DECRYPTER_H_
-
-#include <stddef.h>
-
-#include "base/compiler_specific.h"
-#include "base/macros.h"
-#include "net/quic/crypto/quic_decrypter.h"
-#include "net/quic/crypto/scoped_evp_aead_ctx.h"
-
-namespace net {
-
-// AeadBaseDecrypter is the base class of AEAD QuicDecrypter subclasses.
-class NET_EXPORT_PRIVATE AeadBaseDecrypter : public QuicDecrypter {
- public:
- AeadBaseDecrypter(const EVP_AEAD* aead_alg,
- size_t key_size,
- size_t auth_tag_size,
- size_t nonce_prefix_size);
- ~AeadBaseDecrypter() override;
-
- // QuicDecrypter implementation
- bool SetKey(base::StringPiece key) override;
- bool SetNoncePrefix(base::StringPiece nonce_prefix) override;
- bool SetPreliminaryKey(base::StringPiece key) override;
- bool SetDiversificationNonce(DiversificationNonce nonce) override;
- bool DecryptPacket(QuicPathId path_id,
- QuicPacketNumber packet_number,
- base::StringPiece associated_data,
- base::StringPiece ciphertext,
- char* output,
- size_t* output_length,
- size_t max_output_length) override;
- base::StringPiece GetKey() const override;
- base::StringPiece GetNoncePrefix() const override;
-
- protected:
- // Make these constants available to the subclasses so that the subclasses
- // can assert at compile time their key_size_ and nonce_prefix_size_ do not
- // exceed the maximum.
- static const size_t kMaxKeySize = 32;
- static const size_t kMaxNoncePrefixSize = 4;
-
- private:
- const EVP_AEAD* const aead_alg_;
- const size_t key_size_;
- const size_t auth_tag_size_;
- const size_t nonce_prefix_size_;
- bool have_preliminary_key_;
-
- // The key.
- unsigned char key_[kMaxKeySize];
- // The nonce prefix.
- unsigned char nonce_prefix_[kMaxNoncePrefixSize];
-
- ScopedEVPAEADCtx ctx_;
-
- DISALLOW_COPY_AND_ASSIGN(AeadBaseDecrypter);
-};
-
-} // namespace net
-
-#endif // NET_QUIC_CRYPTO_AEAD_BASE_DECRYPTER_H_
« no previous file with comments | « net/quic/core/spdy_utils_test.cc ('k') | net/quic/crypto/aead_base_decrypter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698