| Index: Source/modules/crypto/KeyPair.cpp
 | 
| diff --git a/Source/modules/crypto/AesCbcParams.cpp b/Source/modules/crypto/KeyPair.cpp
 | 
| similarity index 72%
 | 
| copy from Source/modules/crypto/AesCbcParams.cpp
 | 
| copy to Source/modules/crypto/KeyPair.cpp
 | 
| index e84bc7a2c984a644833b2bd67b73973315729a3e..6b47bc5f8a0b51e85b7f1784ca123b5bbd026095 100644
 | 
| --- a/Source/modules/crypto/AesCbcParams.cpp
 | 
| +++ b/Source/modules/crypto/KeyPair.cpp
 | 
| @@ -29,25 +29,26 @@
 | 
|   */
 | 
|  
 | 
|  #include "config.h"
 | 
| -#include "modules/crypto/AesCbcParams.h"
 | 
| +#include "modules/crypto/KeyPair.h"
 | 
|  
 | 
| -#include "public/platform/WebCryptoAlgorithmParams.h"
 | 
| +#include "modules/crypto/Key.h"
 | 
| +#include "public/platform/WebCryptoKey.h"
 | 
|  
 | 
|  namespace WebCore {
 | 
|  
 | 
| -Uint8Array* AesCbcParams::iv()
 | 
| +PassRefPtr<KeyPair> KeyPair::create(const WebKit::WebCryptoKey& publicKey, const WebKit::WebCryptoKey& privateKey)
 | 
|  {
 | 
| -    if (!m_iv) {
 | 
| -        const WebKit::WebVector<unsigned char>& iv = m_algorithm.aesCbcParams()->iv();
 | 
| -        m_iv = Uint8Array::create(iv.data(), iv.size());
 | 
| -    }
 | 
| -    return m_iv.get();
 | 
| +    ASSERT(publicKey.type() == WebKit::WebCryptoKeyTypePublic);
 | 
| +    ASSERT(privateKey.type() == WebKit::WebCryptoKeyTypePrivate);
 | 
| +    return adoptRef(new KeyPair(Key::create(publicKey), Key::create(privateKey)));
 | 
|  }
 | 
|  
 | 
| -AesCbcParams::AesCbcParams(const WebKit::WebCryptoAlgorithm& algorithm)
 | 
| -    : Algorithm(algorithm)
 | 
| +KeyPair::KeyPair(const PassRefPtr<Key>& publicKey, const PassRefPtr<Key>& privateKey)
 | 
| +    : m_publicKey(publicKey)
 | 
| +    , m_privateKey(privateKey)
 | 
|  {
 | 
| -    ASSERT(algorithm.aesCbcParams());
 | 
| +    ASSERT(publicKey);
 | 
| +    ASSERT(privateKey);
 | 
|      ScriptWrappable::init(this);
 | 
|  }
 | 
|  
 | 
| 
 |