Home | History | Annotate | Download | only in crypto
      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 #include "net/quic/crypto/scoped_evp_cipher_ctx.h"
      6 
      7 #include <openssl/evp.h>
      8 
      9 namespace net {
     10 
     11 ScopedEVPCipherCtx::ScopedEVPCipherCtx()
     12     : ctx_(EVP_CIPHER_CTX_new()) { }
     13 
     14 ScopedEVPCipherCtx::~ScopedEVPCipherCtx() {
     15   EVP_CIPHER_CTX_free(ctx_);
     16 }
     17 
     18 EVP_CIPHER_CTX* ScopedEVPCipherCtx::get() const {
     19   return ctx_;
     20 }
     21 
     22 }  // namespace net
     23