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

Side by Side Diff: crypto/secure_hash_default.cc

Issue 6805019: Move crypto files out of base, to a top level directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Chrome, webkit, remoting and crypto/owners Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/crypto/secure_hash.h" 5 #include "crypto/secure_hash.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/third_party/nss/blapi.h" 8 #include "crypto/third_party/nss/blapi.h"
9 #include "base/third_party/nss/sha256.h" 9 #include "crypto/third_party/nss/sha256.h"
10 10
11 namespace base { 11 namespace crypto {
12 12
13 namespace { 13 namespace {
14 14
15 class SecureHashSHA256NSS : public SecureHash { 15 class SecureHashSHA256NSS : public SecureHash {
16 public: 16 public:
17 SecureHashSHA256NSS() { 17 SecureHashSHA256NSS() {
18 SHA256_Begin(&ctx_); 18 SHA256_Begin(&ctx_);
19 } 19 }
20 20
21 virtual ~SecureHashSHA256NSS() { 21 virtual ~SecureHashSHA256NSS() {
(...skipping 17 matching lines...) Expand all
39 SecureHash* SecureHash::Create(Algorithm algorithm) { 39 SecureHash* SecureHash::Create(Algorithm algorithm) {
40 switch (algorithm) { 40 switch (algorithm) {
41 case SHA256: 41 case SHA256:
42 return new SecureHashSHA256NSS(); 42 return new SecureHashSHA256NSS();
43 default: 43 default:
44 NOTIMPLEMENTED(); 44 NOTIMPLEMENTED();
45 return NULL; 45 return NULL;
46 } 46 }
47 } 47 }
48 48
49 } // namespace base 49 } // namespace crypto
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698