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

Side by Side Diff: base/crypto/symmetric_key_mac.cc

Issue 6410105: run iwyu on base! Base URL: svn://svn.chromium.org/chrome/trunk/src/base
Patch Set: Created 9 years, 10 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 | « base/crypto/signature_verifier_mac.cc ('k') | base/debug/debugger.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/crypto/symmetric_key.h" 5 #include </Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Security.fram ework/Headers/cssmapi.h>
6 6 #include </Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Security.fram ework/Headers/cssmapple.h>
7 #include <CommonCrypto/CommonCryptor.h> 7 #include </Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Security.fram ework/Headers/cssmtype.h>
8 #include <CoreFoundation/CFString.h> 8 #include <stdbool.h>
9 #include <Security/cssm.h> 9 #include <stddef.h>
10 #include <stdint.h>
11 #include <stdlib.h>
12 #include <string>
10 13
11 #include "base/crypto/cssm_init.h" 14 #include "base/crypto/cssm_init.h"
15 #include "base/crypto/symmetric_key.h"
12 #include "base/logging.h" 16 #include "base/logging.h"
13 17
14 namespace { 18 namespace {
15 19
16 CSSM_KEY_TYPE CheckKeyParams(base::SymmetricKey::Algorithm algorithm, 20 CSSM_KEY_TYPE CheckKeyParams(base::SymmetricKey::Algorithm algorithm,
17 size_t key_size_in_bits) { 21 size_t key_size_in_bits) {
18 if (algorithm == base::SymmetricKey::AES) { 22 if (algorithm == base::SymmetricKey::AES) {
19 CHECK(key_size_in_bits == 128 || 23 CHECK(key_size_in_bits == 128 ||
20 key_size_in_bits == 192 || 24 key_size_in_bits == 192 ||
21 key_size_in_bits == 256) 25 key_size_in_bits == 256)
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 bool SymmetricKey::GetRawKey(std::string* raw_key) { 150 bool SymmetricKey::GetRawKey(std::string* raw_key) {
147 *raw_key = key_; 151 *raw_key = key_;
148 return true; 152 return true;
149 } 153 }
150 154
151 CSSM_DATA SymmetricKey::cssm_data() const { 155 CSSM_DATA SymmetricKey::cssm_data() const {
152 return StringToData(key_); 156 return StringToData(key_);
153 } 157 }
154 158
155 } // namespace base 159 } // namespace base
OLDNEW
« no previous file with comments | « base/crypto/signature_verifier_mac.cc ('k') | base/debug/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698