| Index: Source/modules/crypto/KeyPair.h
|
| diff --git a/Source/modules/crypto/Algorithm.h b/Source/modules/crypto/KeyPair.h
|
| similarity index 76%
|
| copy from Source/modules/crypto/Algorithm.h
|
| copy to Source/modules/crypto/KeyPair.h
|
| index 5a201b96ce51282e3a3ed882009617d175485d7c..ce20fd3c24b391ab74433f6bd17d4ed8293d9db7 100644
|
| --- a/Source/modules/crypto/Algorithm.h
|
| +++ b/Source/modules/crypto/KeyPair.h
|
| @@ -28,29 +28,32 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef Algorithm_h
|
| -#define Algorithm_h
|
| +#ifndef KeyPair_h
|
| +#define KeyPair_h
|
|
|
| #include "bindings/v8/ScriptWrappable.h"
|
| -#include "public/platform/WebCryptoAlgorithm.h"
|
| #include "wtf/Forward.h"
|
| -#include "wtf/PassRefPtr.h"
|
| #include "wtf/RefCounted.h"
|
| +#include "wtf/RefPtr.h"
|
| +
|
| +namespace WebKit { class WebCryptoKey; }
|
|
|
| namespace WebCore {
|
|
|
| -class Algorithm : public ScriptWrappable, public RefCounted<Algorithm> {
|
| -public:
|
| - static PassRefPtr<Algorithm> create(const WebKit::WebCryptoAlgorithm&);
|
| +class Key;
|
|
|
| - String name();
|
| +class KeyPair : public ScriptWrappable, public RefCounted<KeyPair> {
|
| +public:
|
| + static PassRefPtr<KeyPair> create(const WebKit::WebCryptoKey& publicKey, const WebKit::WebCryptoKey& privateKey);
|
|
|
| - WebKit::WebCryptoAlgorithmParamsType type() const { return m_algorithm.paramsType(); }
|
| + Key* publicKey() { return m_publicKey.get(); }
|
| + Key* privateKey() { return m_privateKey.get(); }
|
|
|
| protected:
|
| - explicit Algorithm(const WebKit::WebCryptoAlgorithm&);
|
| + KeyPair(const PassRefPtr<Key>& publicKey, const PassRefPtr<Key>& privateKey);
|
|
|
| - const WebKit::WebCryptoAlgorithm m_algorithm;
|
| + RefPtr<Key> m_publicKey;
|
| + RefPtr<Key> m_privateKey;
|
| };
|
|
|
| } // namespace WebCore
|
|
|