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

Side by Side Diff: base/crypto/secure_hash.h

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: Fixes comments by eroman 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
« no previous file with comments | « base/crypto/scoped_nss_types.h ('k') | base/crypto/secure_hash_default.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef BASE_CRYPTO_SECURE_HASH_H_
6 #define BASE_CRYPTO_SECURE_HASH_H_
7 #pragma once
8
9 #include "base/base_api.h"
10 #include "base/basictypes.h"
11
12 namespace base {
13
14 // A wrapper to calculate secure hashes incrementally, allowing to
15 // be used when the full input is not known in advance.
16 class BASE_API SecureHash {
17 public:
18 enum Algorithm {
19 SHA256,
20 };
21 virtual ~SecureHash() {}
22
23 static SecureHash* Create(Algorithm type);
24
25 virtual void Update(const void* input, size_t len) = 0;
26 virtual void Finish(void* output, size_t len) = 0;
27
28 protected:
29 SecureHash() {}
30
31 private:
32 DISALLOW_COPY_AND_ASSIGN(SecureHash);
33 };
34
35 } // namespace base
36
37 #endif // BASE_CRYPTO_SECURE_HASH_H_
OLDNEW
« no previous file with comments | « base/crypto/scoped_nss_types.h ('k') | base/crypto/secure_hash_default.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698