Add CryptoKey base class and bindings
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Oct 2013 17:05:36 +0000 (17:05 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Oct 2013 17:05:36 +0000 (17:05 +0000)
commitde0c97114b4bb5d122324a740c370ca1c29d9289
treeecaf5f4191f4aeb31fa0637fd4c01a6209bab0d4
parenteef88deeac61c15df82aa700329d39f1f275c9a1
Add CryptoKey base class and bindings
https://bugs.webkit.org/show_bug.cgi?id=123216

Reviewed by Sam Weinig.

* crypto/CryptoKey.idl: Added.

* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.list.am:
Process the IDL.

* WebCore.xcodeproj/project.pbxproj: Added files.

* bindings/js/JSCryptoKeyCustom.cpp: Added.
(WebCore::JSCryptoKey::algorithm): Use a visitor to build algorithm dictionary
for the key.

* crypto/CryptoAlgorithmDescriptionBuilder.cpp: Added.
* crypto/CryptoAlgorithmDescriptionBuilder.h: Added.
An interface for a visitor we'll use to expose CrytoKey.algorithm in bindings,
and possibly also for storage serialization. Not complete yet, we'll need support
for a few more simple types, and less trivially, for nested algorithms.

* bindings/js/JSCryptoAlgorithmBuilder.cpp: Added.
* bindings/js/JSCryptoAlgorithmBuilder.h: Added.
An implementation that builds an algorithm description dictionary for JS bindings.

* crypto/CryptoKey.cpp: Added.
(WebCore::CryptoKey::~CryptoKey):
(WebCore::CryptoKey::buildAlgorithmDescription):
* crypto/CryptoKey.h: Added.
Added an almost empty implementation. Some of the functions that are currently
marked as pure virtual will likely be implemented in this base class.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157936 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/GNUmakefile.list.am
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSCryptoAlgorithmBuilder.cpp [new file with mode: 0644]
Source/WebCore/bindings/js/JSCryptoAlgorithmBuilder.h [new file with mode: 0644]
Source/WebCore/bindings/js/JSCryptoKeyCustom.cpp [new file with mode: 0644]
Source/WebCore/crypto/CryptoAlgorithmDescriptionBuilder.cpp [new file with mode: 0644]
Source/WebCore/crypto/CryptoAlgorithmDescriptionBuilder.h [new file with mode: 0644]
Source/WebCore/crypto/CryptoKey.cpp [new file with mode: 0644]
Source/WebCore/crypto/CryptoKey.h [new file with mode: 0644]
Source/WebCore/crypto/CryptoKey.idl [new file with mode: 0644]