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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 const blink::WebCryptoKey& key, | 54 const blink::WebCryptoKey& key, |
55 const unsigned char* data, | 55 const unsigned char* data, |
56 unsigned int data_size, | 56 unsigned int data_size, |
57 blink::WebCryptoResult result); | 57 blink::WebCryptoResult result); |
58 virtual void verifySignature(const blink::WebCryptoAlgorithm& algorithm, | 58 virtual void verifySignature(const blink::WebCryptoAlgorithm& algorithm, |
59 const blink::WebCryptoKey& key, | 59 const blink::WebCryptoKey& key, |
60 const unsigned char* signature, | 60 const unsigned char* signature, |
61 unsigned int signature_size, | 61 unsigned int signature_size, |
62 const unsigned char* data, | 62 const unsigned char* data, |
63 unsigned int data_size, | 63 unsigned int data_size, |
64 blink::WebCryptoResult result); | 64 blink::WebCryptoResult result); |
| 65 virtual void wrapKey(blink::WebCryptoKeyFormat format, |
| 66 const blink::WebCryptoKey& key, |
| 67 const blink::WebCryptoKey& wrapping_key, |
| 68 const blink::WebCryptoAlgorithm& wrap_algorithm, |
| 69 blink::WebCryptoResult result); |
| 70 virtual void unwrapKey( |
| 71 blink::WebCryptoKeyFormat format, |
| 72 const unsigned char* wrapped_key, |
| 73 unsigned wrapped_key_size, |
| 74 const blink::WebCryptoKey& wrapping_key, |
| 75 const blink::WebCryptoAlgorithm& unwrap_algorithm, |
| 76 const blink::WebCryptoAlgorithm& unwrapped_key_algorithm, |
| 77 bool extractable, |
| 78 blink::WebCryptoKeyUsageMask usages, |
| 79 blink::WebCryptoResult result); |
65 // This method synchronously computes a digest for the given data, returning | 80 // This method synchronously computes a digest for the given data, returning |
66 // |true| if successful and |false| otherwise. | 81 // |true| if successful and |false| otherwise. |
67 virtual bool digestSynchronous(const blink::WebCryptoAlgorithmId algorithm_id, | 82 virtual bool digestSynchronous(const blink::WebCryptoAlgorithmId algorithm_id, |
68 const unsigned char* data, | 83 const unsigned char* data, |
69 unsigned int data_size, | 84 unsigned int data_size, |
70 blink::WebArrayBuffer& result); | 85 blink::WebArrayBuffer& result); |
71 | 86 |
72 virtual bool deserializeKeyForClone( | 87 virtual bool deserializeKeyForClone( |
73 const blink::WebCryptoKeyAlgorithm& algorithm, | 88 const blink::WebCryptoKeyAlgorithm& algorithm, |
74 blink::WebCryptoKeyType type, | 89 blink::WebCryptoKeyType type, |
75 bool extractable, | 90 bool extractable, |
76 blink::WebCryptoKeyUsageMask usages, | 91 blink::WebCryptoKeyUsageMask usages, |
77 const unsigned char* key_data, | 92 const unsigned char* key_data, |
78 unsigned key_data_size, | 93 unsigned key_data_size, |
79 blink::WebCryptoKey& key); | 94 blink::WebCryptoKey& key); |
80 | 95 |
81 virtual bool serializeKeyForClone(const blink::WebCryptoKey& key, | 96 virtual bool serializeKeyForClone(const blink::WebCryptoKey& key, |
82 blink::WebVector<unsigned char>& key_data); | 97 blink::WebVector<unsigned char>& key_data); |
83 | 98 |
84 private: | 99 private: |
85 DISALLOW_COPY_AND_ASSIGN(WebCryptoImpl); | 100 DISALLOW_COPY_AND_ASSIGN(WebCryptoImpl); |
86 }; | 101 }; |
87 | 102 |
88 } // namespace content | 103 } // namespace content |
89 | 104 |
90 #endif // CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_IMPL_H_ | 105 #endif // CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_IMPL_H_ |
OLD | NEW |