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

Side by Side Diff: base/crypto/encryptor.h

Issue 1558018: Implements support for PBKDF2-based key derivation, random key generation, an... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Style fixup Created 10 years, 8 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 | base/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) 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 #ifndef BASE_CRYPTO_ENCRYPTOR_H_ 5 #ifndef BASE_CRYPTO_ENCRYPTOR_H_
6 #define BASE_CRYPTO_ENCRYPTOR_H_ 6 #define BASE_CRYPTO_ENCRYPTOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/crypto/symmetric_key.h" 10 #include "base/crypto/symmetric_key.h"
11 #include "base/scoped_ptr.h" 11 #include "base/scoped_ptr.h"
12 12
13 #if defined(USE_NSS)
14 #include "base/crypto/scoped_nss_types.h"
15 #elif defined(OS_WIN)
16 #include "base/crypto/scoped_capi_types.h"
17 #endif
18
13 namespace base { 19 namespace base {
14 20
15 class Encryptor { 21 class Encryptor {
16 public: 22 public:
17 enum Mode { 23 enum Mode {
18 CBC 24 CBC
19 }; 25 };
20 Encryptor(); 26 Encryptor();
21 virtual ~Encryptor(); 27 virtual ~Encryptor();
22 28
(...skipping 15 matching lines...) Expand all
38 44
39 #if defined(USE_NSS) 45 #if defined(USE_NSS)
40 ScopedPK11Slot slot_; 46 ScopedPK11Slot slot_;
41 ScopedSECItem param_; 47 ScopedSECItem param_;
42 #elif defined(OS_MACOSX) 48 #elif defined(OS_MACOSX)
43 bool Crypt(int /*CCOperation*/ op, 49 bool Crypt(int /*CCOperation*/ op,
44 const std::string& input, 50 const std::string& input,
45 std::string* output); 51 std::string* output);
46 52
47 std::string iv_; 53 std::string iv_;
54 #elif defined(OS_WIN)
55 ScopedHCRYPTKEY capi_key_;
56 DWORD block_size_;
48 #endif 57 #endif
49 }; 58 };
50 59
51 } // namespace base 60 } // namespace base
52 61
53 #endif // BASE_CRYPTO_ENCRYPTOR_H_ 62 #endif // BASE_CRYPTO_ENCRYPTOR_H_
OLDNEW
« no previous file with comments | « no previous file | base/crypto/encryptor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698