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

Side by Side Diff: base/hmac_nss.cc

Issue 6714032: Move some files in base to base/memory. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: only base Created 9 years, 9 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
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 #include "base/hmac.h" 5 #include "base/hmac.h"
6 6
7 #include <nss.h> 7 #include <nss.h>
8 #include <pk11pub.h> 8 #include <pk11pub.h>
9 9
10 #include "base/crypto/scoped_nss_types.h" 10 #include "base/crypto/scoped_nss_types.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/memory/scoped_ptr.h"
12 #include "base/nss_util.h" 13 #include "base/nss_util.h"
13 #include "base/scoped_ptr.h"
14 14
15 namespace base { 15 namespace base {
16 16
17 struct HMACPlatformData { 17 struct HMACPlatformData {
18 CK_MECHANISM_TYPE mechanism_; 18 CK_MECHANISM_TYPE mechanism_;
19 ScopedPK11Slot slot_; 19 ScopedPK11Slot slot_;
20 ScopedPK11SymKey sym_key_; 20 ScopedPK11SymKey sym_key_;
21 }; 21 };
22 22
23 HMAC::HMAC(HashAlgorithm hash_alg) 23 HMAC::HMAC(HashAlgorithm hash_alg)
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 if (PK11_DigestFinal(context.get(), 108 if (PK11_DigestFinal(context.get(),
109 digest, &len, digest_length) != SECSuccess) { 109 digest, &len, digest_length) != SECSuccess) {
110 NOTREACHED(); 110 NOTREACHED();
111 return false; 111 return false;
112 } 112 }
113 113
114 return true; 114 return true;
115 } 115 }
116 116
117 } // namespace base 117 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698