summaryrefslogtreecommitdiffstats
path: root/base/crypto/signature_verifier.h
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-09 18:40:50 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-09 18:40:50 +0000
commit692033a35dd662cd04b965cfa31581176ebdcfe6 (patch)
tree6224a1b37f7c1a0f6296490ba5e805e815b51247 /base/crypto/signature_verifier.h
parent256865a6ab0cf3affd171b2eb275bfa7bb8c964d (diff)
downloadchromium_src-692033a35dd662cd04b965cfa31581176ebdcfe6.zip
chromium_src-692033a35dd662cd04b965cfa31581176ebdcfe6.tar.gz
chromium_src-692033a35dd662cd04b965cfa31581176ebdcfe6.tar.bz2
Implement PBKDF2-based key derivation, random key generation,
and AES-CBC encryption/decryption using CryptoAPI. Contributed by Ryan Sleevi <ryan.sleevi@gmail.com>. Original review URL: http://codereview.chromium.org/1558018 R=wtc,albertb BUG=none TEST=SymmetricKeyTest.* and EncryptorTest.* Review URL: http://codereview.chromium.org/1528021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44106 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/crypto/signature_verifier.h')
-rw-r--r--base/crypto/signature_verifier.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/base/crypto/signature_verifier.h b/base/crypto/signature_verifier.h
index bfe6c332..1ef08cf 100644
--- a/base/crypto/signature_verifier.h
+++ b/base/crypto/signature_verifier.h
@@ -11,15 +11,16 @@
#include <cryptoht.h>
#elif defined(OS_MACOSX)
#include <Security/cssm.h>
-#elif defined(OS_WIN)
-#include <windows.h>
-#include <wincrypt.h>
#endif
#include <vector>
#include "base/basictypes.h"
+#if defined(OS_WIN)
+#include "base/crypto/scoped_capi_types.h"
+#endif
+
namespace base {
// The SignatureVerifier class verifies a signature using a bare public key
@@ -90,11 +91,11 @@ class SignatureVerifier {
CSSM_KEY public_key_;
#elif defined(OS_WIN)
- HCRYPTPROV provider_;
+ ScopedHCRYPTPROV provider_;
- HCRYPTHASH hash_object_;
+ ScopedHCRYPTHASH hash_object_;
- HCRYPTKEY public_key_;
+ ScopedHCRYPTKEY public_key_;
#endif
};