OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_WEBCRYPTO_WEBCRYPTO_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_WEBCRYPTO_WEBCRYPTO_IMPL_H_ |
6 #define CONTENT_RENDERER_WEBCRYPTO_WEBCRYPTO_IMPL_H_ | 6 #define CONTENT_RENDERER_WEBCRYPTO_WEBCRYPTO_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "third_party/WebKit/public/platform/WebCrypto.h" | 10 #include "third_party/WebKit/public/platform/WebCrypto.h" |
11 #include "third_party/WebKit/public/platform/WebCryptoAlgorithm.h" | |
11 | 12 |
12 namespace content { | 13 namespace content { |
13 | 14 |
14 // Wrapper around the blink WebCrypto asynchronous interface, which forwards to | 15 // Wrapper around the blink WebCrypto asynchronous interface, which forwards to |
15 // the synchronous platfrom (NSS or OpenSSL) implementation. | 16 // the synchronous platfrom (NSS or OpenSSL) implementation. |
16 // | 17 // |
17 // TODO(eroman): Post the synchronous work to a background thread. | 18 // TODO(eroman): Post the synchronous work to a background thread. |
18 class WebCryptoImpl : public blink::WebCrypto { | 19 class WebCryptoImpl : public blink::WebCrypto { |
19 public: | 20 public: |
20 WebCryptoImpl(); | 21 WebCryptoImpl(); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
53 const unsigned char* data, | 54 const unsigned char* data, |
54 unsigned int data_size, | 55 unsigned int data_size, |
55 blink::WebCryptoResult result); | 56 blink::WebCryptoResult result); |
56 virtual void verifySignature(const blink::WebCryptoAlgorithm& algorithm, | 57 virtual void verifySignature(const blink::WebCryptoAlgorithm& algorithm, |
57 const blink::WebCryptoKey& key, | 58 const blink::WebCryptoKey& key, |
58 const unsigned char* signature, | 59 const unsigned char* signature, |
59 unsigned int signature_size, | 60 unsigned int signature_size, |
60 const unsigned char* data, | 61 const unsigned char* data, |
61 unsigned int data_size, | 62 unsigned int data_size, |
62 blink::WebCryptoResult result); | 63 blink::WebCryptoResult result); |
64 virtual bool digestSynchronous(const blink::WebCryptoAlgorithmId algorithm, | |
65 const unsigned char* data, | |
66 unsigned int data_size, | |
67 blink::WebArrayBuffer& result); | |
eroman
2014/02/21 23:11:20
Have you tested if this works? Try adding an OVERR
jww
2014/02/21 23:23:34
In the end, you approved the version that was WebA
| |
63 | 68 |
64 private: | 69 private: |
65 DISALLOW_COPY_AND_ASSIGN(WebCryptoImpl); | 70 DISALLOW_COPY_AND_ASSIGN(WebCryptoImpl); |
66 }; | 71 }; |
67 | 72 |
68 } // namespace content | 73 } // namespace content |
69 | 74 |
70 #endif // CONTENT_RENDERER_WEBCRYPTO_WEBCRYPTO_IMPL_H_ | 75 #endif // CONTENT_RENDERER_WEBCRYPTO_WEBCRYPTO_IMPL_H_ |
OLD | NEW |