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

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

Issue 6714032: Move some files in base to base/memory. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: only base Created 9 years, 9 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
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 "base/crypto/symmetric_key.h"
6 6
7 #include <winsock2.h> // For htonl. 7 #include <winsock2.h> // For htonl.
8 8
9 #include <vector> 9 #include <vector>
10 10
11 // TODO(wtc): replace scoped_array by std::vector. 11 // TODO(wtc): replace scoped_array by std::vector.
12 #include "base/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 13
14 namespace base { 14 namespace base {
15 15
16 namespace { 16 namespace {
17 17
18 // The following is a non-public Microsoft header documented in MSDN under 18 // The following is a non-public Microsoft header documented in MSDN under
19 // CryptImportKey / CryptExportKey. Following the header is the byte array of 19 // CryptImportKey / CryptExportKey. Following the header is the byte array of
20 // the actual plaintext key. 20 // the actual plaintext key.
21 struct PlaintextBlobHeader { 21 struct PlaintextBlobHeader {
22 BLOBHEADER hdr; 22 BLOBHEADER hdr;
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 HCRYPTKEY key, 527 HCRYPTKEY key,
528 const void* key_data, size_t key_size_in_bytes) 528 const void* key_data, size_t key_size_in_bytes)
529 : provider_(provider), key_(key) { 529 : provider_(provider), key_(key) {
530 if (key_data) { 530 if (key_data) {
531 raw_key_.assign(reinterpret_cast<const char*>(key_data), 531 raw_key_.assign(reinterpret_cast<const char*>(key_data),
532 key_size_in_bytes); 532 key_size_in_bytes);
533 } 533 }
534 } 534 }
535 535
536 } // namespace base 536 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698