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

Side by Side Diff: net/quic/crypto/quic_encrypter.h

Issue 11125002: Add QuicFramer and friends. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix final comments. Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/quic/crypto/quic_decrypter.cc ('k') | net/quic/crypto/quic_encrypter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NET_QUIC_CRYPTO_QUIC_ENCRYPTER_H_
6 #define NET_QUIC_CRYPTO_QUIC_ENCRYPTER_H_
7
8 #include "net/base/net_export.h"
9 #include "net/quic/crypto/crypto_protocol.h"
10 #include "net/quic/quic_protocol.h"
11
12 namespace net {
13
14 class NET_EXPORT_PRIVATE QuicEncrypter {
15 public:
16 virtual ~QuicEncrypter() {}
17
18 static QuicEncrypter* Create(CryptoTag algorithm);
19
20 // Returns a newly created QuicData object containing the encrypted
21 // |plaintext| as well as a MAC over both |plaintext| and |associated_data|,
22 // or NULL if there is an error.
23 virtual QuicData* Encrypt(base::StringPiece associated_data,
24 base::StringPiece plaintext) = 0;
25
26 // Returns the maximum length of plaintext that can be encrypted
27 // to ciphertext no larger than |ciphertext_size|.
28 virtual size_t GetMaxPlaintextSize(size_t ciphertext_size) = 0;
29
30 // Returns the length of the ciphertext that would be generated by encrypting
31 // to plaintext of size |plaintext_size|.
32 virtual size_t GetCiphertextSize(size_t plaintext_size) = 0;
33
34 };
35
36 } // namespace net
37
38 #endif // NET_QUIC_CRYPTO_QUIC_ENCRYPTER_H_
OLDNEW
« no previous file with comments | « net/quic/crypto/quic_decrypter.cc ('k') | net/quic/crypto/quic_encrypter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698