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

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

Issue 12623017: Add Aes128GcmEncrypter and Aes128GcmDecrypter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Rename the .cc files to _openssl.cc Created 7 years, 9 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2013 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_SCOPED_EVP_CIPHER_CTX_H_
6 #define NET_QUIC_CRYPTO_SCOPED_EVP_CIPHER_CTX_H_
7
8 #include <openssl/evp.h>
9
10 #include "base/logging.h"
11
12 namespace net {
13
14 class ScopedEVPCipherCtx {
15 public:
16 ScopedEVPCipherCtx() {
17 EVP_CIPHER_CTX_init(&ctx_);
18 }
19
20 ~ScopedEVPCipherCtx() {
21 int rv = EVP_CIPHER_CTX_cleanup(&ctx_);
22 DCHECK_EQ(rv, 1);
23 }
24
25 EVP_CIPHER_CTX* get() { return &ctx_; }
26
27 private:
28 EVP_CIPHER_CTX ctx_;
29 };
30
31 } // namespace net
32
33 #endif // NET_QUIC_CRYPTO_SCOPED_EVP_CIPHER_CTX_H_
OLDNEW
« net/quic/crypto/aes_128_gcm_decrypter_openssl.cc ('K') | « net/quic/crypto/quic_encrypter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698