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

Side by Side Diff: crypto/openssl_util.h

Issue 2204743002: Fix a documentation typo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CRYPTO_OPENSSL_UTIL_H_ 5 #ifndef CRYPTO_OPENSSL_UTIL_H_
6 #define CRYPTO_OPENSSL_UTIL_H_ 6 #define CRYPTO_OPENSSL_UTIL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/location.h" 10 #include "base/location.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "crypto/crypto_export.h" 12 #include "crypto/crypto_export.h"
13 13
14 namespace crypto { 14 namespace crypto {
15 15
16 // Provides a buffer of at least MIN_SIZE bytes, for use when calling OpenSSL's 16 // Provides a buffer of at least MIN_SIZE bytes, for use when calling OpenSSL's
17 // SHA256, HMAC, etc functions, adapting the buffer sizing rules to meet those 17 // SHA256, HMAC, etc functions, adapting the buffer sizing rules to meet those
18 // of the our base wrapper APIs. 18 // of our base wrapper APIs.
19 // This allows the library to write directly to the caller's buffer if it is of 19 // This allows the library to write directly to the caller's buffer if it is of
20 // sufficient size, but if not it will write to temporary |min_sized_buffer_| 20 // sufficient size, but if not it will write to temporary |min_sized_buffer_|
21 // of required size and then its content is automatically copied out on 21 // of required size and then its content is automatically copied out on
22 // destruction, with truncation as appropriate. 22 // destruction, with truncation as appropriate.
23 template<int MIN_SIZE> 23 template<int MIN_SIZE>
24 class ScopedOpenSSLSafeSizeBuffer { 24 class ScopedOpenSSLSafeSizeBuffer {
25 public: 25 public:
26 ScopedOpenSSLSafeSizeBuffer(unsigned char* output, size_t output_len) 26 ScopedOpenSSLSafeSizeBuffer(unsigned char* output, size_t output_len)
27 : output_(output), 27 : output_(output),
28 output_len_(output_len) { 28 output_len_(output_len) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 private: 84 private:
85 const tracked_objects::Location location_; 85 const tracked_objects::Location location_;
86 86
87 DISALLOW_IMPLICIT_CONSTRUCTORS(OpenSSLErrStackTracer); 87 DISALLOW_IMPLICIT_CONSTRUCTORS(OpenSSLErrStackTracer);
88 }; 88 };
89 89
90 } // namespace crypto 90 } // namespace crypto
91 91
92 #endif // CRYPTO_OPENSSL_UTIL_H_ 92 #endif // CRYPTO_OPENSSL_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698