summaryrefslogtreecommitdiff
path: root/chromium/net/quic/crypto/scoped_evp_cipher_ctx.cc
blob: b904f870fddd440f3078e5a560fa23a08ef6a109 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// 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.

#include "net/quic/crypto/scoped_evp_cipher_ctx.h"

#include <openssl/evp.h>

namespace net {

ScopedEVPCipherCtx::ScopedEVPCipherCtx()
    : ctx_(EVP_CIPHER_CTX_new()) { }

ScopedEVPCipherCtx::~ScopedEVPCipherCtx() {
  EVP_CIPHER_CTX_free(ctx_);
}

EVP_CIPHER_CTX* ScopedEVPCipherCtx::get() const {
  return ctx_;
}

}  // namespace net