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

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, 5 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
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 WebCryptoSHADigest(const WebKit::WebCryptoAlgorithmId);
eroman 2013/07/19 01:11:13 nit: mark as "explicit"
Bryan Eyler 2013/07/24 00:33:53 Done.
22
23 virtual void process(const unsigned char*, size_t) OVERRIDE;
eroman 2013/07/19 01:11:13 nit: add the parameter names (blink style omits th
Bryan Eyler 2013/07/24 00:33:53 Done.
24
25 virtual void abort() OVERRIDE;
26
27 virtual void finish(WebKit::WebCryptoOperationResult*) OVERRIDE;
eroman 2013/07/19 01:11:13 Add the parameter name
Bryan Eyler 2013/07/24 00:33:53 Removed param as part of new interface.
28
29 private:
30 virtual ~WebCryptoSHADigest();
31
32 #if defined(USE_NSS)
33 PK11Context* context_;
34 SECOidTag hash_algorithm_;
35
36 bool InitializeContext();
37 #endif
38 };
39
40 } // namespace content
41
42 #endif // CONTENT_RENDERER_WEBCRYPTO_IMPL_H_
eroman 2013/07/19 01:11:13 Update this comment
Bryan Eyler 2013/07/24 00:33:53 Done.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698