Roll src/third_party/WebKit 582258c:665ffc7 (svn 182369:182370)
[chromium-blink-merge.git] / crypto / openssl_bio_string.h
blobca46c12de8d8feab6077e09f2ab6bb866501153b
1 // Copyright 2014 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.
5 #ifndef CRYPTO_OPENSSL_BIO_STRING_H_
6 #define CRYPTO_OPENSSL_BIO_STRING_H_
8 #include <string>
10 #include "crypto/crypto_export.h"
12 // From <openssl/bio.h>
13 typedef struct bio_st BIO;
15 namespace crypto {
17 // Creates a new BIO that can be used with OpenSSL's various output functions,
18 // and which will write all output directly into |out|. This is primarily
19 // intended as a utility to reduce the amount of copying and separate
20 // allocations when performing extensive string modifications or streaming
21 // within OpenSSL.
23 // Note: |out| must remain valid for the duration of the BIO.
24 CRYPTO_EXPORT BIO* BIO_new_string(std::string* out);
26 } // namespace crypto
28 #endif // CRYPTO_OPENSSL_BIO_STRING_H_