Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 40 | 40 |
| 41 // TODO(albertb): Support streaming encryption. | 41 // TODO(albertb): Support streaming encryption. |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 SymmetricKey* key_; | 44 SymmetricKey* key_; |
| 45 Mode mode_; | 45 Mode mode_; |
| 46 | 46 |
| 47 #if defined(USE_NSS) | 47 #if defined(USE_NSS) |
| 48 ScopedPK11Slot slot_; | 48 ScopedPK11Slot slot_; |
| 49 ScopedSECItem param_; | 49 ScopedSECItem param_; |
| 50 #elif defined(OS_MACOSX) | 50 #elif defined(OS_MACOSX) || defined(USE_OPENSSL) |
|
Ryan Sleevi
2010/11/10 23:46:58
I'm a little nervous with this here. CCOperation i
joth
2010/11/11 17:35:58
The comment looked more complex than just duplicat
| |
| 51 bool Crypt(int /*CCOperation*/ op, | 51 bool Crypt(int /*CCOperation*/ op, |
| 52 const std::string& input, | 52 const std::string& input, |
| 53 std::string* output); | 53 std::string* output); |
| 54 | 54 |
| 55 std::string iv_; | 55 std::string iv_; |
| 56 #elif defined(OS_WIN) | 56 #elif defined(OS_WIN) |
| 57 ScopedHCRYPTKEY capi_key_; | 57 ScopedHCRYPTKEY capi_key_; |
| 58 DWORD block_size_; | 58 DWORD block_size_; |
| 59 #endif | 59 #endif |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 } // namespace base | 62 } // namespace base |
| 63 | 63 |
| 64 #endif // BASE_CRYPTO_ENCRYPTOR_H_ | 64 #endif // BASE_CRYPTO_ENCRYPTOR_H_ |
| OLD | NEW |