summaryrefslogtreecommitdiffstats
path: root/crypto/encryptor.h
diff options
context:
space:
mode:
authorddorwin@chromium.org <ddorwin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-15 08:11:52 +0000
committerddorwin@chromium.org <ddorwin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-15 08:11:52 +0000
commit45a445210f04343da2a29d4f08e8cea905925b33 (patch)
treebe93e5caef6cca72af3192bf3892e2a82fe8a8c0 /crypto/encryptor.h
parent8368a0a348e5e445cefbee7fec023a988f21fa75 (diff)
downloadchromium_src-45a445210f04343da2a29d4f08e8cea905925b33.zip
chromium_src-45a445210f04343da2a29d4f08e8cea905925b33.tar.gz
chromium_src-45a445210f04343da2a29d4f08e8cea905925b33.tar.bz2
Use NSS for symmetric key crypto operations on Windows and Mac.
Encryptor, HMAC, and SymmetricKey now use NSS on all platforms except Android. This allows us to use them inside the sandbox, something that was not possible when using the platform APIs. On Windows, Native Client 64-bit builds still use the the platform APIs. BUG=127803,124741 TEST=Existing tests since there is no change in functionality. Review URL: https://chromiumcodereview.appspot.com/10543146 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142356 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'crypto/encryptor.h')
-rw-r--r--crypto/encryptor.h17
1 files changed, 3 insertions, 14 deletions
diff --git a/crypto/encryptor.h b/crypto/encryptor.h
index 8a27a90..f2c0c8b 100644
--- a/crypto/encryptor.h
+++ b/crypto/encryptor.h
@@ -14,10 +14,8 @@
#include "build/build_config.h"
#include "crypto/crypto_export.h"
-#if defined(USE_NSS)
+#if defined(USE_NSS) || defined(OS_WIN) || defined(OS_MACOSX)
#include "crypto/scoped_nss_types.h"
-#elif defined(OS_WIN)
-#include "crypto/scoped_capi_types.h"
#endif
namespace crypto {
@@ -33,7 +31,7 @@ class CRYPTO_EXPORT Encryptor {
// This class implements a 128-bits counter to be used in AES-CTR encryption.
// Only 128-bits counter is supported in this class.
- class Counter {
+ class CRYPTO_EXPORT Counter {
public:
explicit Counter(const base::StringPiece& counter);
~Counter();
@@ -121,7 +119,7 @@ class CRYPTO_EXPORT Encryptor {
const base::StringPiece& input,
std::string* output);
std::string iv_;
-#elif defined(USE_NSS)
+#elif defined(USE_NSS) || defined(OS_WIN) || defined(OS_MACOSX)
bool Crypt(PK11Context* context,
const base::StringPiece& input,
std::string* output);
@@ -130,15 +128,6 @@ class CRYPTO_EXPORT Encryptor {
std::string* output);
ScopedPK11Slot slot_;
ScopedSECItem param_;
-#elif defined(OS_MACOSX)
- bool Crypt(int /*CCOperation*/ op,
- const base::StringPiece& input,
- std::string* output);
-
- std::string iv_;
-#elif defined(OS_WIN)
- ScopedHCRYPTKEY capi_key_;
- DWORD block_size_;
#endif
};