OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 13 matching lines...) Expand all Loading... |
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 */ | 27 */ |
28 | 28 |
29 #ifndef SubtleCrypto_h | 29 #ifndef SubtleCrypto_h |
30 #define SubtleCrypto_h | 30 #define SubtleCrypto_h |
31 | 31 |
32 #include "bindings/v8/ScriptWrappable.h" | 32 #include "bindings/v8/ScriptWrappable.h" |
33 #include "wtf/Forward.h" | 33 #include "wtf/Forward.h" |
| 34 #include "wtf/HashMap.h" |
34 #include "wtf/PassRefPtr.h" | 35 #include "wtf/PassRefPtr.h" |
35 #include "wtf/RefCounted.h" | 36 #include "wtf/RefCounted.h" |
| 37 #include "wtf/text/StringHash.h" |
36 | 38 |
37 namespace WebCore { | 39 namespace WebCore { |
38 | 40 |
| 41 class CryptoOperation; |
| 42 class Dictionary; |
| 43 |
39 typedef int ExceptionCode; | 44 typedef int ExceptionCode; |
40 | 45 |
41 class SubtleCrypto : public ScriptWrappable, public RefCounted<SubtleCrypto> { | 46 class SubtleCrypto : public ScriptWrappable, public RefCounted<SubtleCrypto> { |
42 public: | 47 public: |
43 static PassRefPtr<SubtleCrypto> create() { return adoptRef(new SubtleCrypto(
)); } | 48 static PassRefPtr<SubtleCrypto> create() { return adoptRef(new SubtleCrypto(
)); } |
44 | 49 |
| 50 PassRefPtr<CryptoOperation> encrypt(const Dictionary& algorithm, ExceptionCo
de&); |
| 51 PassRefPtr<CryptoOperation> decrypt(const Dictionary& algorithm, ExceptionCo
de&); |
| 52 PassRefPtr<CryptoOperation> sign(const Dictionary& algorithm, ExceptionCode&
); |
| 53 PassRefPtr<CryptoOperation> verify(const Dictionary& algorithm, ExceptionCod
e&); |
| 54 PassRefPtr<CryptoOperation> digest(const Dictionary& algorithm, ExceptionCod
e&); |
| 55 |
45 private: | 56 private: |
46 SubtleCrypto(); | 57 SubtleCrypto(); |
47 }; | 58 }; |
48 | 59 |
49 } | 60 } // namespace WebCore |
50 | 61 |
51 #endif | 62 #endif |
OLD | NEW |