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

Side by Side Diff: content/renderer/webcrypto_sha_digest.h

Issue 19757011: WebCrypto: Implement digest() using NSS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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
OLDNEW
(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_SHA_DIGEST_H_
6 #define CONTENT_RENDERER_WEBCRYPTO_SHA_DIGEST_H_
7
8 #include "base/compiler_specific.h"
9
10 #if defined(USE_NSS)
11 #include <pk11pub.h>
12 #endif
Ryan Sleevi 2013/07/31 18:19:19 nit: Put this header *below* the other headers Se
Bryan Eyler 2013/08/02 00:49:05 Changed to forward declaration. It's not a very p
13
14 #include "third_party/WebKit/public/platform/WebCrypto.h"
15 #include "third_party/WebKit/public/platform/WebCryptoAlgorithm.h"
16
17 namespace content {
18
19 class WebCryptoSHADigest : public WebKit::WebCryptoOperation {
20 public:
21 explicit WebCryptoSHADigest(const WebKit::WebCryptoAlgorithmId algorithm_id,
22 WebKit::WebCryptoOperationResult& result);
23 virtual ~WebCryptoSHADigest();
24
25 bool Initialize();
26
27 virtual void process(const unsigned char* bytes, size_t size) OVERRIDE;
28 virtual void abort() OVERRIDE;
29 virtual void finish() OVERRIDE;
30
31 private:
32 WebKit::WebCryptoOperationResult& result_;
eroman 2013/07/31 02:23:50 This needs to be a copy, otherwise it can end up b
Bryan Eyler 2013/08/02 00:49:05 Done.
33
34 #if defined(USE_NSS)
35 PK11Context* context_;
36 SECOidTag hash_algorithm_;
37 #endif
38
39 unsigned int hash_result_length_;
40 };
41
42 } // namespace content
43
44 #endif // CONTENT_RENDERER_WEBCRYPTO_SHA_DIGEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698