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

Unified Diff: base/crypto/signature_creator_win.cc

Issue 1528021: Implement PBKDF2-based key derivation, random key generation,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Make albertb's suggested changes. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/crypto/signature_creator.h ('k') | base/crypto/signature_verifier.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/crypto/signature_creator_win.cc
===================================================================
--- base/crypto/signature_creator_win.cc (revision 43766)
+++ base/crypto/signature_creator_win.cc (working copy)
@@ -15,7 +15,7 @@
result->key_ = key;
if (!CryptCreateHash(key->provider(), CALG_SHA1, 0, 0,
- &result->hash_object_)) {
+ result->hash_object_.receive())) {
NOTREACHED();
return NULL;
}
@@ -25,15 +25,8 @@
SignatureCreator::SignatureCreator() : hash_object_(0) {}
-SignatureCreator::~SignatureCreator() {
- if (hash_object_) {
- if (!CryptDestroyHash(hash_object_))
- NOTREACHED();
+SignatureCreator::~SignatureCreator() {}
- hash_object_ = 0;
- }
-}
-
bool SignatureCreator::Update(const uint8* data_part, int data_part_len) {
if (!CryptHashData(hash_object_, data_part, data_part_len, 0)) {
NOTREACHED();
« no previous file with comments | « base/crypto/signature_creator.h ('k') | base/crypto/signature_verifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698