| 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 "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 blink::WebCryptoKeyUsageMask usage_mask, | 40 blink::WebCryptoKeyUsageMask usage_mask, |
| 41 blink::WebCryptoResult result); | 41 blink::WebCryptoResult result); |
| 42 virtual void importKey( | 42 virtual void importKey( |
| 43 blink::WebCryptoKeyFormat format, | 43 blink::WebCryptoKeyFormat format, |
| 44 const unsigned char* key_data, | 44 const unsigned char* key_data, |
| 45 unsigned key_data_size, | 45 unsigned key_data_size, |
| 46 const blink::WebCryptoAlgorithm& algorithm_or_null, | 46 const blink::WebCryptoAlgorithm& algorithm_or_null, |
| 47 bool extractable, | 47 bool extractable, |
| 48 blink::WebCryptoKeyUsageMask usage_mask, | 48 blink::WebCryptoKeyUsageMask usage_mask, |
| 49 blink::WebCryptoResult result); | 49 blink::WebCryptoResult result); |
| 50 virtual void exportKey( |
| 51 blink::WebCryptoKeyFormat format, |
| 52 const blink::WebCryptoKey& key, |
| 53 blink::WebCryptoResult result); |
| 50 virtual void sign( | 54 virtual void sign( |
| 51 const blink::WebCryptoAlgorithm& algorithm, | 55 const blink::WebCryptoAlgorithm& algorithm, |
| 52 const blink::WebCryptoKey& key, | 56 const blink::WebCryptoKey& key, |
| 53 const unsigned char* data, | 57 const unsigned char* data, |
| 54 unsigned data_size, | 58 unsigned data_size, |
| 55 blink::WebCryptoResult result); | 59 blink::WebCryptoResult result); |
| 56 virtual void verifySignature( | 60 virtual void verifySignature( |
| 57 const blink::WebCryptoAlgorithm& algorithm, | 61 const blink::WebCryptoAlgorithm& algorithm, |
| 58 const blink::WebCryptoKey& key, | 62 const blink::WebCryptoKey& key, |
| 59 const unsigned char* signature, | 63 const unsigned char* signature, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 blink::WebCryptoKey* public_key, | 102 blink::WebCryptoKey* public_key, |
| 99 blink::WebCryptoKey* private_key); | 103 blink::WebCryptoKey* private_key); |
| 100 bool ImportKeyInternal( | 104 bool ImportKeyInternal( |
| 101 blink::WebCryptoKeyFormat format, | 105 blink::WebCryptoKeyFormat format, |
| 102 const unsigned char* key_data, | 106 const unsigned char* key_data, |
| 103 unsigned key_data_size, | 107 unsigned key_data_size, |
| 104 const blink::WebCryptoAlgorithm& algorithm_or_null, | 108 const blink::WebCryptoAlgorithm& algorithm_or_null, |
| 105 bool extractable, | 109 bool extractable, |
| 106 blink::WebCryptoKeyUsageMask usage_mask, | 110 blink::WebCryptoKeyUsageMask usage_mask, |
| 107 blink::WebCryptoKey* key); | 111 blink::WebCryptoKey* key); |
| 112 bool ExportKeyInternal( |
| 113 blink::WebCryptoKeyFormat format, |
| 114 const blink::WebCryptoKey& key, |
| 115 blink::WebArrayBuffer* buffer); |
| 108 bool SignInternal( | 116 bool SignInternal( |
| 109 const blink::WebCryptoAlgorithm& algorithm, | 117 const blink::WebCryptoAlgorithm& algorithm, |
| 110 const blink::WebCryptoKey& key, | 118 const blink::WebCryptoKey& key, |
| 111 const unsigned char* data, | 119 const unsigned char* data, |
| 112 unsigned data_size, | 120 unsigned data_size, |
| 113 blink::WebArrayBuffer* buffer); | 121 blink::WebArrayBuffer* buffer); |
| 114 bool VerifySignatureInternal( | 122 bool VerifySignatureInternal( |
| 115 const blink::WebCryptoAlgorithm& algorithm, | 123 const blink::WebCryptoAlgorithm& algorithm, |
| 116 const blink::WebCryptoKey& key, | 124 const blink::WebCryptoKey& key, |
| 117 const unsigned char* signature, | 125 const unsigned char* signature, |
| 118 unsigned signature_size, | 126 unsigned signature_size, |
| 119 const unsigned char* data, | 127 const unsigned char* data, |
| 120 unsigned data_size, | 128 unsigned data_size, |
| 121 bool* signature_match); | 129 bool* signature_match); |
| 122 | 130 |
| 123 private: | 131 private: |
| 124 DISALLOW_COPY_AND_ASSIGN(WebCryptoImpl); | 132 DISALLOW_COPY_AND_ASSIGN(WebCryptoImpl); |
| 125 }; | 133 }; |
| 126 | 134 |
| 127 } // namespace content | 135 } // namespace content |
| 128 | 136 |
| 129 #endif // CONTENT_RENDERER_WEBCRYPTO_WEBCRYPTO_IMPL_H_ | 137 #endif // CONTENT_RENDERER_WEBCRYPTO_WEBCRYPTO_IMPL_H_ |
| OLD | NEW |