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

Side by Side Diff: crypto/secure_hash_openssl.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: 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 <openssl/ssl.h> 7 #include <openssl/ssl.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/openssl_util.h" 11 #include "crypto/openssl_util.h"
12 12
13 namespace base { 13 namespace crypto {
14 14
15 namespace { 15 namespace {
16 16
17 class SecureHashSHA256OpenSSL : public SecureHash { 17 class SecureHashSHA256OpenSSL : public SecureHash {
18 public: 18 public:
19 SecureHashSHA256OpenSSL() { 19 SecureHashSHA256OpenSSL() {
20 SHA256_Init(&ctx_); 20 SHA256_Init(&ctx_);
21 } 21 }
22 22
23 virtual ~SecureHashSHA256OpenSSL() { 23 virtual ~SecureHashSHA256OpenSSL() {
(...skipping 19 matching lines...) Expand all
43 SecureHash* SecureHash::Create(Algorithm algorithm) { 43 SecureHash* SecureHash::Create(Algorithm algorithm) {
44 switch (algorithm) { 44 switch (algorithm) {
45 case SHA256: 45 case SHA256:
46 return new SecureHashSHA256OpenSSL(); 46 return new SecureHashSHA256OpenSSL();
47 default: 47 default:
48 NOTIMPLEMENTED(); 48 NOTIMPLEMENTED();
49 return NULL; 49 return NULL;
50 } 50 }
51 } 51 }
52 52
53 } // namespace base 53 } // namespace crypto
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698