Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1567)

Unified Diff: Source/modules/crypto/KeyPair.h

Issue 23617006: WebCrypto: Add the KeyPair interface. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase onto master Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/crypto/CryptoResult.cpp ('k') | Source/modules/crypto/KeyPair.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/modules/crypto/CryptoResult.cpp ('k') | Source/modules/crypto/KeyPair.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698