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

Side by Side Diff: crypto/encryptor_openssl.cc

Issue 16123026: Use a direct include of strings headers in crypto/, dbus/, device/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
« no previous file with comments | « no previous file | crypto/encryptor_unittest.cc » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "crypto/encryptor.h" 5 #include "crypto/encryptor.h"
6 6
7 #include <openssl/aes.h> 7 #include <openssl/aes.h>
8 #include <openssl/evp.h> 8 #include <openssl/evp.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/string_util.h" 11 #include "base/strings/string_util.h"
12 #include "crypto/openssl_util.h" 12 #include "crypto/openssl_util.h"
13 #include "crypto/symmetric_key.h" 13 #include "crypto/symmetric_key.h"
14 14
15 namespace crypto { 15 namespace crypto {
16 16
17 namespace { 17 namespace {
18 18
19 const EVP_CIPHER* GetCipherForKey(SymmetricKey* key) { 19 const EVP_CIPHER* GetCipherForKey(SymmetricKey* key) {
20 switch (key->key().length()) { 20 switch (key->key().length()) {
21 case 16: return EVP_aes_128_cbc(); 21 case 16: return EVP_aes_128_cbc();
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 out_len += tail_len; 127 out_len += tail_len;
128 DCHECK_LE(out_len, static_cast<int>(output_size)); 128 DCHECK_LE(out_len, static_cast<int>(output_size));
129 result.resize(out_len); 129 result.resize(out_len);
130 130
131 output->swap(result); 131 output->swap(result);
132 return true; 132 return true;
133 } 133 }
134 134
135 } // namespace crypto 135 } // namespace crypto
OLDNEW
« no previous file with comments | « no previous file | crypto/encryptor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698