OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 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 CONTENT_RENDERER_WEBCRYPTO_DIGEST_H_ | |
6 #define CONTENT_RENDERER_WEBCRYPTO_DIGEST_H_ | |
7 | |
8 #include "base/compiler_specific.h" | |
9 | |
10 #include "third_party/WebKit/public/platform/WebCrypto.h" | |
11 #include "third_party/WebKit/public/platform/WebCryptoAlgorithm.h" | |
12 | |
13 #if defined(USE_NSS) | |
14 typedef struct HASHContextStr HASHContext; | |
15 #endif | |
16 | |
17 namespace content { | |
18 | |
19 class WebCryptoDigest : public WebKit::WebCryptoOperation { | |
20 public: | |
21 explicit WebCryptoDigest(const WebKit::WebCryptoOperationResult& result); | |
22 virtual ~WebCryptoDigest(); | |
23 | |
24 bool Initialize(const WebKit::WebCryptoAlgorithm& algorithm); | |
25 | |
26 virtual void process(const unsigned char* bytes, size_t size) OVERRIDE; | |
jamesr
2013/08/07 23:25:31
document what interface these are overriding
if t
| |
27 virtual void abort() OVERRIDE; | |
28 virtual void finish() OVERRIDE; | |
29 | |
30 private: | |
31 WebKit::WebCryptoOperationResult result_; | |
32 | |
33 #if defined(USE_NSS) | |
34 HASHContext* context_; | |
35 #endif | |
36 }; | |
37 | |
38 } // namespace content | |
39 | |
40 #endif // CONTENT_RENDERER_WEBCRYPTO_DIGEST_H_ | |
OLD | NEW |