OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CHILD_WEBCRYPTO_WEBCRYPTO_IMPL_H_ | 5 #ifndef CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_IMPL_H_ |
6 #define CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_IMPL_H_ | 6 #define CONTENT_CHILD_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" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 const unsigned char* data, | 61 const unsigned char* data, |
62 unsigned int data_size, | 62 unsigned int data_size, |
63 blink::WebCryptoResult result); | 63 blink::WebCryptoResult result); |
64 // This method synchronously computes a digest for the given data, returning | 64 // This method synchronously computes a digest for the given data, returning |
65 // |true| if successful and |false| otherwise. | 65 // |true| if successful and |false| otherwise. |
66 virtual bool digestSynchronous(const blink::WebCryptoAlgorithmId algorithm_id, | 66 virtual bool digestSynchronous(const blink::WebCryptoAlgorithmId algorithm_id, |
67 const unsigned char* data, | 67 const unsigned char* data, |
68 unsigned int data_size, | 68 unsigned int data_size, |
69 blink::WebArrayBuffer& result); | 69 blink::WebArrayBuffer& result); |
70 | 70 |
| 71 virtual bool deserializeKeyForClone( |
| 72 const blink::WebCryptoKeyAlgorithm& algorithm, |
| 73 blink::WebCryptoKeyType type, |
| 74 bool extractable, |
| 75 blink::WebCryptoKeyUsageMask usages, |
| 76 const unsigned char* key_data, |
| 77 unsigned key_data_size, |
| 78 blink::WebCryptoKey& key); |
| 79 |
| 80 virtual bool serializeKeyForClone(const blink::WebCryptoKey& key, |
| 81 blink::WebVector<unsigned char>& key_data); |
| 82 |
71 private: | 83 private: |
72 DISALLOW_COPY_AND_ASSIGN(WebCryptoImpl); | 84 DISALLOW_COPY_AND_ASSIGN(WebCryptoImpl); |
73 }; | 85 }; |
74 | 86 |
75 } // namespace content | 87 } // namespace content |
76 | 88 |
77 #endif // CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_IMPL_H_ | 89 #endif // CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_IMPL_H_ |
OLD | NEW |