Chromium Code Reviews| Index: content/renderer/webcrypto_sha_digest.h |
| diff --git a/content/renderer/webcrypto_sha_digest.h b/content/renderer/webcrypto_sha_digest.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5e875f08fd49390aaaa33b50d4c7a1f439b461ff |
| --- /dev/null |
| +++ b/content/renderer/webcrypto_sha_digest.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_RENDERER_WEBCRYPTO_SHA_DIGEST_H_ |
| +#define CONTENT_RENDERER_WEBCRYPTO_SHA_DIGEST_H_ |
| + |
| +#include "base/compiler_specific.h" |
| + |
| +#if defined(USE_NSS) |
| +#include <pk11pub.h> |
| +#endif |
| + |
| +#include "third_party/WebKit/public/platform/WebCrypto.h" |
| +#include "third_party/WebKit/public/platform/WebCryptoAlgorithm.h" |
| + |
| +namespace content { |
| + |
| +class WebCryptoSHADigest : public WebKit::WebCryptoOperation { |
| + public: |
| + WebCryptoSHADigest(const WebKit::WebCryptoAlgorithmId); |
|
eroman
2013/07/19 01:11:13
nit: mark as "explicit"
Bryan Eyler
2013/07/24 00:33:53
Done.
|
| + |
| + 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.
|
| + |
| + virtual void abort() OVERRIDE; |
| + |
| + 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.
|
| + |
| + private: |
| + virtual ~WebCryptoSHADigest(); |
| + |
| +#if defined(USE_NSS) |
| + PK11Context* context_; |
| + SECOidTag hash_algorithm_; |
| + |
| + bool InitializeContext(); |
| +#endif |
| +}; |
| + |
| +} // namespace content |
| + |
| +#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.
|