<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[212736] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/212736">212736</a></dd>
<dt>Author</dt> <dd>jiewen_tan@apple.com</dd>
<dt>Date</dt> <dd>2017-02-21 12:04:44 -0800 (Tue, 21 Feb 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>[WebCrypto] Add support for AES-CFB
https://bugs.webkit.org/show_bug.cgi?id=168344
&lt;rdar://problem/20940221&gt;

Reviewed by Brent Fulgham.

Source/WebCore:

This patch adds support for AES-CFB. Operations of AES-CFB include: encrypt, decrypt, generateKey,
importKey, exportKey, wrapKey, and unwrapKey. This implementation follows a slightly old version
of WebCryptoAPI spec: https://www.w3.org/TR/2014/CR-WebCryptoAPI-20141211/#aes-cfb.

Tests: crypto/subtle/aes-cbc-cfb-decrypt-malformed-parameters.html
       crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters.html
       crypto/subtle/aes-cbc-import-key-unwrap-jwk-rsa-key-public.html
       crypto/subtle/aes-cfb-generate-export-key-jwk-length-128.html
       crypto/subtle/aes-cfb-generate-export-key-jwk-length-192.html
       crypto/subtle/aes-cfb-generate-export-key-jwk-length-256.html
       crypto/subtle/aes-cfb-generate-export-raw-key.html
       crypto/subtle/aes-cfb-generate-key-encrypt-decrypt.html
       crypto/subtle/aes-cfb-generate-key.html
       crypto/subtle/aes-cfb-import-jwk-key-length-128.html
       crypto/subtle/aes-cfb-import-jwk-key-length-192.html
       crypto/subtle/aes-cfb-import-jwk-key-length-256.html
       crypto/subtle/aes-cfb-import-key-decrypt.html
       crypto/subtle/aes-cfb-import-key-encrypt.html
       crypto/subtle/aes-cfb-import-key-unwrap-jwk-key.html
       crypto/subtle/aes-cfb-import-key-unwrap-raw-key.html
       crypto/subtle/aes-cfb-import-key-wrap-jwk-key.html
       crypto/subtle/aes-cfb-import-key-wrap-raw-key.html
       crypto/subtle/aes-cfb-import-raw-key.html
       crypto/workers/subtle/aes-cfb-import-key-decrypt.html
       crypto/workers/subtle/aes-cfb-import-key-encrypt.html
       crypto/workers/subtle/aes-cfb-import-key-unwrap-key.html
       crypto/workers/subtle/aes-cfb-import-key-wrap-key.html

* CMakeLists.txt:
* DerivedSources.make:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* WebCore.xcodeproj/project.pbxproj:
Add CryptoAlgorithmAES_CFB.cpp,
change AesCbcParams.idl to AesCbcCfbParams.idl.
* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::normalizeCryptoAlgorithmParameters):
Add support for AES-CFB.
* crypto/CryptoAlgorithm.h:
Include &lt;wtf/Variant.h&gt;.
* crypto/CryptoAlgorithmParameters.h:
Add support for AES-CFB.
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
Rename CryptoAlgorithmAesCbcParams to CryptoAlgorithmAesCbcCfbParams.
* crypto/algorithms/CryptoAlgorithmAES_CFB.cpp: Added.
(WebCore::usagesAreInvalidForCryptoAlgorithmAES_CFB):
(WebCore::CryptoAlgorithmAES_CFB::create):
(WebCore::CryptoAlgorithmAES_CFB::identifier):
(WebCore::CryptoAlgorithmAES_CFB::encrypt):
(WebCore::CryptoAlgorithmAES_CFB::decrypt):
(WebCore::CryptoAlgorithmAES_CFB::generateKey):
(WebCore::CryptoAlgorithmAES_CFB::importKey):
(WebCore::CryptoAlgorithmAES_CFB::exportKey):
* crypto/algorithms/CryptoAlgorithmAES_CFB.h: Added.
* crypto/gnutls/CryptoAlgorithmAES_CFBGnuTLS.cpp: Added.
(WebCore::CryptoAlgorithmAES_CFB::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CFB::platformDecrypt):
Add dummy support of AES_CFB for GTK+.
* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
(WebCore::transformAES_CBC):
Drop conditional PLATFORM(COCOA).
(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
Rename CryptoAlgorithmAesCbcParams to CryptoAlgorithmAesCbcCfbParams.
* crypto/mac/CryptoAlgorithmAES_CFBMac.cpp: Added.
(WebCore::transformAES_CFB):
(WebCore::CryptoAlgorithmAES_CFB::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CFB::platformDecrypt):
* crypto/mac/CryptoAlgorithmRegistryMac.cpp:
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
Add support for AES-CFB.
* crypto/parameters/AesCbcCfbParams.idl: Renamed from Source/WebCore/crypto/parameters/AesCbcParams.idl.
* crypto/parameters/CryptoAlgorithmAesCbcCfbParams.h: Renamed from Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcParams.h.
Since dictionaries AesCbcParams and AesCfbParams are essentially the same, I combine them together in our implementations.

LayoutTests:

* crypto/subtle/aes-cbc-cfb-decrypt-malformed-parameters-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-decrypt-malformed-parameters-expected.txt.
* crypto/subtle/aes-cbc-cfb-decrypt-malformed-parameters.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-decrypt-malformed-parameters.html.
* crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-encrypt-malformed-parameters-expected.txt.
* crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-encrypt-malformed-parameters.html.
* crypto/subtle/aes-cbc-import-key-unwrap-jwk-rsa-key-public-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-import-key-uwrap-jwk-rsa-key-public-expected.txt.
* crypto/subtle/aes-cbc-import-key-unwrap-jwk-rsa-key-public.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-import-key-uwrap-jwk-rsa-key-public.html.
* crypto/subtle/aes-cfb-generate-export-key-jwk-length-128-expected.txt: Added.
* crypto/subtle/aes-cfb-generate-export-key-jwk-length-128.html: Added.
* crypto/subtle/aes-cfb-generate-export-key-jwk-length-192-expected.txt: Added.
* crypto/subtle/aes-cfb-generate-export-key-jwk-length-192.html: Added.
* crypto/subtle/aes-cfb-generate-export-key-jwk-length-256-expected.txt: Added.
* crypto/subtle/aes-cfb-generate-export-key-jwk-length-256.html: Added.
* crypto/subtle/aes-cfb-generate-export-raw-key-expected.txt: Added.
* crypto/subtle/aes-cfb-generate-export-raw-key.html: Added.
* crypto/subtle/aes-cfb-generate-key-encrypt-decrypt-expected.txt: Added.
* crypto/subtle/aes-cfb-generate-key-encrypt-decrypt.html: Added.
* crypto/subtle/aes-cfb-generate-key-expected.txt: Added.
* crypto/subtle/aes-cfb-generate-key.html: Added.
* crypto/subtle/aes-cfb-import-jwk-key-length-128-expected.txt: Added.
* crypto/subtle/aes-cfb-import-jwk-key-length-128.html: Added.
* crypto/subtle/aes-cfb-import-jwk-key-length-192-expected.txt: Added.
* crypto/subtle/aes-cfb-import-jwk-key-length-192.html: Added.
* crypto/subtle/aes-cfb-import-jwk-key-length-256-expected.txt: Added.
* crypto/subtle/aes-cfb-import-jwk-key-length-256.html: Added.
* crypto/subtle/aes-cfb-import-key-decrypt-expected.txt: Added.
* crypto/subtle/aes-cfb-import-key-decrypt.html: Added.
* crypto/subtle/aes-cfb-import-key-encrypt-expected.txt: Added.
* crypto/subtle/aes-cfb-import-key-encrypt.html: Added.
* crypto/subtle/aes-cfb-import-key-unwrap-jwk-key-expected.txt: Added.
* crypto/subtle/aes-cfb-import-key-unwrap-jwk-key.html: Added.
* crypto/subtle/aes-cfb-import-key-unwrap-raw-key-expected.txt: Added.
* crypto/subtle/aes-cfb-import-key-unwrap-raw-key.html: Added.
* crypto/subtle/aes-cfb-import-key-wrap-jwk-key-expected.txt: Added.
* crypto/subtle/aes-cfb-import-key-wrap-jwk-key.html: Added.
* crypto/subtle/aes-cfb-import-key-wrap-raw-key-expected.txt: Added.
* crypto/subtle/aes-cfb-import-key-wrap-raw-key.html: Added.
* crypto/subtle/aes-cfb-import-raw-key-expected.txt: Added.
* crypto/subtle/aes-cfb-import-raw-key.html: Added.
* crypto/subtle/aes-generate-key-malformed-parameters-expected.txt:
* crypto/subtle/aes-generate-key-malformed-parameters.html:
* crypto/subtle/aes-import-key-malformed-parameters-expected.txt:
* crypto/subtle/aes-import-key-malformed-parameters.html:
* crypto/workers/subtle/aes-cfb-import-key-decrypt-expected.txt: Added.
* crypto/workers/subtle/aes-cfb-import-key-decrypt.html: Added.
* crypto/workers/subtle/aes-cfb-import-key-encrypt-expected.txt: Added.
* crypto/workers/subtle/aes-cfb-import-key-encrypt.html: Added.
* crypto/workers/subtle/aes-cfb-import-key-unwrap-key-expected.txt: Added.
* crypto/workers/subtle/aes-cfb-import-key-unwrap-key.html: Added.
* crypto/workers/subtle/aes-cfb-import-key-wrap-key-expected.txt: Added.
* crypto/workers/subtle/aes-cfb-import-key-wrap-key.html: Added.
* crypto/workers/subtle/resources/aes-cfb-import-key-decrypt.js: Added.
* crypto/workers/subtle/resources/aes-cfb-import-key-encrypt.js: Added.
* crypto/workers/subtle/resources/aes-cfb-import-key-unwrap-key.js: Added.
* crypto/workers/subtle/resources/aes-cfb-import-key-wrap-key.js: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaesgeneratekeymalformedparametersexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-generate-key-malformed-parameters-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaesgeneratekeymalformedparametershtml">trunk/LayoutTests/crypto/subtle/aes-generate-key-malformed-parameters.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaesimportkeymalformedparametersexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-import-key-malformed-parameters-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaesimportkeymalformedparametershtml">trunk/LayoutTests/crypto/subtle/aes-import-key-malformed-parameters.html</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCorePlatformGTKcmake">trunk/Source/WebCore/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebCorePlatformMaccmake">trunk/Source/WebCore/PlatformMac.cmake</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSSubtleCryptoCustomcpp">trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptoCryptoAlgorithmh">trunk/Source/WebCore/crypto/CryptoAlgorithm.h</a></li>
<li><a href="#trunkSourceWebCorecryptoCryptoAlgorithmParametersh">trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h</a></li>
<li><a href="#trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmAES_CBCcpp">trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptomacCryptoAlgorithmAES_CBCMaccpp">trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptomacCryptoAlgorithmRegistryMaccpp">trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRegistryMac.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestscryptosubtleaescbccfbdecryptmalformedparametersexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cbc-cfb-decrypt-malformed-parameters-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbccfbdecryptmalformedparametershtml">trunk/LayoutTests/crypto/subtle/aes-cbc-cfb-decrypt-malformed-parameters.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbccfbencryptmalformedparametersexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbccfbencryptmalformedparametershtml">trunk/LayoutTests/crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcimportkeyunwrapjwkrsakeypublicexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-unwrap-jwk-rsa-key-public-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcimportkeyunwrapjwkrsakeypublichtml">trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-unwrap-jwk-rsa-key-public.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbgenerateexportkeyjwklength128expectedtxt">trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-128-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbgenerateexportkeyjwklength128html">trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-128.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbgenerateexportkeyjwklength192expectedtxt">trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-192-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbgenerateexportkeyjwklength192html">trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-192.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbgenerateexportkeyjwklength256expectedtxt">trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-256-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbgenerateexportkeyjwklength256html">trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-256.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbgenerateexportrawkeyexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-raw-key-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbgenerateexportrawkeyhtml">trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-raw-key.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbgeneratekeyencryptdecryptexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cfb-generate-key-encrypt-decrypt-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbgeneratekeyencryptdecrypthtml">trunk/LayoutTests/crypto/subtle/aes-cfb-generate-key-encrypt-decrypt.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbgeneratekeyexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cfb-generate-key-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbgeneratekeyhtml">trunk/LayoutTests/crypto/subtle/aes-cfb-generate-key.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbimportjwkkeylength128expectedtxt">trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-128-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbimportjwkkeylength128html">trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-128.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbimportjwkkeylength192expectedtxt">trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-192-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbimportjwkkeylength192html">trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-192.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbimportjwkkeylength256expectedtxt">trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-256-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbimportjwkkeylength256html">trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-256.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbimportkeydecryptexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-decrypt-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbimportkeydecrypthtml">trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-decrypt.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbimportkeyencryptexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-encrypt-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbimportkeyencrypthtml">trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-encrypt.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbimportkeyunwrapjwkkeyexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-unwrap-jwk-key-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbimportkeyunwrapjwkkeyhtml">trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-unwrap-jwk-key.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbimportkeyunwraprawkeyexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-unwrap-raw-key-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbimportkeyunwraprawkeyhtml">trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-unwrap-raw-key.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbimportkeywrapjwkkeyexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-wrap-jwk-key-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbimportkeywrapjwkkeyhtml">trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-wrap-jwk-key.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbimportkeywraprawkeyexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-wrap-raw-key-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbimportkeywraprawkeyhtml">trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-wrap-raw-key.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbimportrawkeyexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cfb-import-raw-key-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescfbimportrawkeyhtml">trunk/LayoutTests/crypto/subtle/aes-cfb-import-raw-key.html</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleaescfbimportkeydecryptexpectedtxt">trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-decrypt-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleaescfbimportkeydecrypthtml">trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-decrypt.html</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleaescfbimportkeyencryptexpectedtxt">trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-encrypt-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleaescfbimportkeyencrypthtml">trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-encrypt.html</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleaescfbimportkeyunwrapkeyexpectedtxt">trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-unwrap-key-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleaescfbimportkeyunwrapkeyhtml">trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-unwrap-key.html</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleaescfbimportkeywrapkeyexpectedtxt">trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-wrap-key-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleaescfbimportkeywrapkeyhtml">trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-wrap-key.html</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleresourcesaescfbimportkeydecryptjs">trunk/LayoutTests/crypto/workers/subtle/resources/aes-cfb-import-key-decrypt.js</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleresourcesaescfbimportkeyencryptjs">trunk/LayoutTests/crypto/workers/subtle/resources/aes-cfb-import-key-encrypt.js</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleresourcesaescfbimportkeyunwrapkeyjs">trunk/LayoutTests/crypto/workers/subtle/resources/aes-cfb-import-key-unwrap-key.js</a></li>
<li><a href="#trunkLayoutTestscryptoworkerssubtleresourcesaescfbimportkeywrapkeyjs">trunk/LayoutTests/crypto/workers/subtle/resources/aes-cfb-import-key-wrap-key.js</a></li>
<li><a href="#trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmAES_CFBcpp">trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CFB.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmAES_CFBh">trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CFB.h</a></li>
<li><a href="#trunkSourceWebCorecryptognutlsCryptoAlgorithmAES_CFBGnuTLScpp">trunk/Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_CFBGnuTLS.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptomacCryptoAlgorithmAES_CFBMaccpp">trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_CFBMac.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptoparametersAesCbcCfbParamsidl">trunk/Source/WebCore/crypto/parameters/AesCbcCfbParams.idl</a></li>
<li><a href="#trunkSourceWebCorecryptoparametersCryptoAlgorithmAesCbcCfbParamsh">trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcCfbParams.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestscryptosubtleaescbcdecryptmalformedparametersexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cbc-decrypt-malformed-parameters-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcdecryptmalformedparametershtml">trunk/LayoutTests/crypto/subtle/aes-cbc-decrypt-malformed-parameters.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcencryptmalformedparametersexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-malformed-parameters-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcencryptmalformedparametershtml">trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-malformed-parameters.html</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcimportkeyuwrapjwkrsakeypublicexpectedtxt">trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-uwrap-jwk-rsa-key-public-expected.txt</a></li>
<li><a href="#trunkLayoutTestscryptosubtleaescbcimportkeyuwrapjwkrsakeypublichtml">trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-uwrap-jwk-rsa-key-public.html</a></li>
<li><a href="#trunkSourceWebCorecryptoparametersAesCbcParamsidl">trunk/Source/WebCore/crypto/parameters/AesCbcParams.idl</a></li>
<li><a href="#trunkSourceWebCorecryptoparametersCryptoAlgorithmAesCbcParamsh">trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcParams.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/LayoutTests/ChangeLog        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -1,3 +1,66 @@
</span><ins>+2017-02-21  Jiewen Tan  &lt;jiewen_tan@apple.com&gt;
+
+        [WebCrypto] Add support for AES-CFB
+        https://bugs.webkit.org/show_bug.cgi?id=168344
+        &lt;rdar://problem/20940221&gt;
+
+        Reviewed by Brent Fulgham.
+
+        * crypto/subtle/aes-cbc-cfb-decrypt-malformed-parameters-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-decrypt-malformed-parameters-expected.txt.
+        * crypto/subtle/aes-cbc-cfb-decrypt-malformed-parameters.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-decrypt-malformed-parameters.html.
+        * crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-encrypt-malformed-parameters-expected.txt.
+        * crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-encrypt-malformed-parameters.html.
+        * crypto/subtle/aes-cbc-import-key-unwrap-jwk-rsa-key-public-expected.txt: Renamed from LayoutTests/crypto/subtle/aes-cbc-import-key-uwrap-jwk-rsa-key-public-expected.txt.
+        * crypto/subtle/aes-cbc-import-key-unwrap-jwk-rsa-key-public.html: Renamed from LayoutTests/crypto/subtle/aes-cbc-import-key-uwrap-jwk-rsa-key-public.html.
+        * crypto/subtle/aes-cfb-generate-export-key-jwk-length-128-expected.txt: Added.
+        * crypto/subtle/aes-cfb-generate-export-key-jwk-length-128.html: Added.
+        * crypto/subtle/aes-cfb-generate-export-key-jwk-length-192-expected.txt: Added.
+        * crypto/subtle/aes-cfb-generate-export-key-jwk-length-192.html: Added.
+        * crypto/subtle/aes-cfb-generate-export-key-jwk-length-256-expected.txt: Added.
+        * crypto/subtle/aes-cfb-generate-export-key-jwk-length-256.html: Added.
+        * crypto/subtle/aes-cfb-generate-export-raw-key-expected.txt: Added.
+        * crypto/subtle/aes-cfb-generate-export-raw-key.html: Added.
+        * crypto/subtle/aes-cfb-generate-key-encrypt-decrypt-expected.txt: Added.
+        * crypto/subtle/aes-cfb-generate-key-encrypt-decrypt.html: Added.
+        * crypto/subtle/aes-cfb-generate-key-expected.txt: Added.
+        * crypto/subtle/aes-cfb-generate-key.html: Added.
+        * crypto/subtle/aes-cfb-import-jwk-key-length-128-expected.txt: Added.
+        * crypto/subtle/aes-cfb-import-jwk-key-length-128.html: Added.
+        * crypto/subtle/aes-cfb-import-jwk-key-length-192-expected.txt: Added.
+        * crypto/subtle/aes-cfb-import-jwk-key-length-192.html: Added.
+        * crypto/subtle/aes-cfb-import-jwk-key-length-256-expected.txt: Added.
+        * crypto/subtle/aes-cfb-import-jwk-key-length-256.html: Added.
+        * crypto/subtle/aes-cfb-import-key-decrypt-expected.txt: Added.
+        * crypto/subtle/aes-cfb-import-key-decrypt.html: Added.
+        * crypto/subtle/aes-cfb-import-key-encrypt-expected.txt: Added.
+        * crypto/subtle/aes-cfb-import-key-encrypt.html: Added.
+        * crypto/subtle/aes-cfb-import-key-unwrap-jwk-key-expected.txt: Added.
+        * crypto/subtle/aes-cfb-import-key-unwrap-jwk-key.html: Added.
+        * crypto/subtle/aes-cfb-import-key-unwrap-raw-key-expected.txt: Added.
+        * crypto/subtle/aes-cfb-import-key-unwrap-raw-key.html: Added.
+        * crypto/subtle/aes-cfb-import-key-wrap-jwk-key-expected.txt: Added.
+        * crypto/subtle/aes-cfb-import-key-wrap-jwk-key.html: Added.
+        * crypto/subtle/aes-cfb-import-key-wrap-raw-key-expected.txt: Added.
+        * crypto/subtle/aes-cfb-import-key-wrap-raw-key.html: Added.
+        * crypto/subtle/aes-cfb-import-raw-key-expected.txt: Added.
+        * crypto/subtle/aes-cfb-import-raw-key.html: Added.
+        * crypto/subtle/aes-generate-key-malformed-parameters-expected.txt:
+        * crypto/subtle/aes-generate-key-malformed-parameters.html:
+        * crypto/subtle/aes-import-key-malformed-parameters-expected.txt:
+        * crypto/subtle/aes-import-key-malformed-parameters.html:
+        * crypto/workers/subtle/aes-cfb-import-key-decrypt-expected.txt: Added.
+        * crypto/workers/subtle/aes-cfb-import-key-decrypt.html: Added.
+        * crypto/workers/subtle/aes-cfb-import-key-encrypt-expected.txt: Added.
+        * crypto/workers/subtle/aes-cfb-import-key-encrypt.html: Added.
+        * crypto/workers/subtle/aes-cfb-import-key-unwrap-key-expected.txt: Added.
+        * crypto/workers/subtle/aes-cfb-import-key-unwrap-key.html: Added.
+        * crypto/workers/subtle/aes-cfb-import-key-wrap-key-expected.txt: Added.
+        * crypto/workers/subtle/aes-cfb-import-key-wrap-key.html: Added.
+        * crypto/workers/subtle/resources/aes-cfb-import-key-decrypt.js: Added.
+        * crypto/workers/subtle/resources/aes-cfb-import-key-encrypt.js: Added.
+        * crypto/workers/subtle/resources/aes-cfb-import-key-unwrap-key.js: Added.
+        * crypto/workers/subtle/resources/aes-cfb-import-key-wrap-key.js: Added.
+
</ins><span class="cx"> 2017-02-21  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r212699.
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbccfbdecryptmalformedparametersexpectedtxtfromrev212735trunkLayoutTestscryptosubtleaescbcdecryptmalformedparametersexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/crypto/subtle/aes-cbc-cfb-decrypt-malformed-parameters-expected.txt (from rev 212735, trunk/LayoutTests/crypto/subtle/aes-cbc-decrypt-malformed-parameters-expected.txt) (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-cfb-decrypt-malformed-parameters-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-cfb-decrypt-malformed-parameters-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+Test decrypting using AES-CBC/AES-CFB with malformed parameters
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS crypto.subtle.decrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;&quot;)}, key, cipherText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS crypto.subtle.decrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;j&quot;)}, key, cipherText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS crypto.subtle.decrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMrd&quot;)}, key, cipherText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS crypto.subtle.decrypt({name: &quot;aes-cfb-8&quot;, iv: asciiToUint8Array(&quot;&quot;)}, key, cipherText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS crypto.subtle.decrypt({name: &quot;aes-cfb-8&quot;, iv: asciiToUint8Array(&quot;j&quot;)}, key, cipherText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS crypto.subtle.decrypt({name: &quot;aes-cfb-8&quot;, iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMrd&quot;)}, key, cipherText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbccfbdecryptmalformedparametershtmlfromrev212735trunkLayoutTestscryptosubtleaescbcdecryptmalformedparametershtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/crypto/subtle/aes-cbc-cfb-decrypt-malformed-parameters.html (from rev 212735, trunk/LayoutTests/crypto/subtle/aes-cbc-decrypt-malformed-parameters.html) (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-cfb-decrypt-malformed-parameters.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-cfb-decrypt-malformed-parameters.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test decrypting using AES-CBC/AES-CFB with malformed parameters&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = false;
+var cipherText = hexStringToUint8Array(&quot;2ffa4618784dfd414b22c40c6330d022&quot;);
+var rawKey = asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;);
+
+crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cbc&quot;, extractable, [&quot;decrypt&quot;]).then(function(result) {
+    key = result;
+    // Wrong iv length
+    shouldReject('crypto.subtle.decrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;&quot;)}, key, cipherText)');
+    shouldReject('crypto.subtle.decrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;j&quot;)}, key, cipherText)');
+    shouldReject('crypto.subtle.decrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMrd&quot;)}, key, cipherText)');
+
+    finishJSTest();
+});
+
+crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cfb-8&quot;, extractable, [&quot;decrypt&quot;]).then(function(result) {
+    key = result;
+    // Wrong iv length
+    shouldReject('crypto.subtle.decrypt({name: &quot;aes-cfb-8&quot;, iv: asciiToUint8Array(&quot;&quot;)}, key, cipherText)');
+    shouldReject('crypto.subtle.decrypt({name: &quot;aes-cfb-8&quot;, iv: asciiToUint8Array(&quot;j&quot;)}, key, cipherText)');
+    shouldReject('crypto.subtle.decrypt({name: &quot;aes-cfb-8&quot;, iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMrd&quot;)}, key, cipherText)');
+
+    finishJSTest();
+});
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbccfbencryptmalformedparametersexpectedtxtfromrev212735trunkLayoutTestscryptosubtleaescbcencryptmalformedparametersexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters-expected.txt (from rev 212735, trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-malformed-parameters-expected.txt) (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+Test encrypting using AES-CBC/AES-CFB with malformed parameters
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS crypto.subtle.encrypt(&quot;aes-cbc&quot;, key, plainText) rejected promise  with TypeError: Member AesCbcCfbParams.iv is required and must be an instance of BufferSource.
+PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;}, key, plainText) rejected promise  with TypeError: Member AesCbcCfbParams.iv is required and must be an instance of BufferSource.
+PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: true}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: 1}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: null}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: undefined}, key, plainText) rejected promise  with TypeError: Member AesCbcCfbParams.iv is required and must be an instance of BufferSource.
+PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: Symbol()}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: { }}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: &quot;foo&quot;}, key, plainText) rejected promise  with TypeError: Type error.
+PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;&quot;)}, key, plainText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;j&quot;)}, key, plainText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMrd&quot;)}, key, plainText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS crypto.subtle.encrypt(&quot;aes-cfb-8&quot;, key, plainText) rejected promise  with TypeError: Member AesCbcCfbParams.iv is required and must be an instance of BufferSource.
+PASS crypto.subtle.encrypt({name: &quot;aes-cfb-8&quot;}, key, plainText) rejected promise  with TypeError: Member AesCbcCfbParams.iv is required and must be an instance of BufferSource.
+PASS crypto.subtle.encrypt({name: &quot;aes-cfb-8&quot;, iv: asciiToUint8Array(&quot;&quot;)}, key, plainText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS crypto.subtle.encrypt({name: &quot;aes-cfb-8&quot;, iv: asciiToUint8Array(&quot;j&quot;)}, key, plainText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS crypto.subtle.encrypt({name: &quot;aes-cfb-8&quot;, iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMrd&quot;)}, key, plainText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbccfbencryptmalformedparametershtmlfromrev212735trunkLayoutTestscryptosubtleaescbcencryptmalformedparametershtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters.html (from rev 212735, trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-malformed-parameters.html) (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,57 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test encrypting using AES-CBC/AES-CFB with malformed parameters&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = false;
+var plainText = asciiToUint8Array(&quot;Hello, World!&quot;);
+var rawKey = asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;);
+
+crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cbc&quot;, extractable, [&quot;encrypt&quot;]).then(function(result) {
+    key = result;
+    // Malformed AlgorithmIdentifiers
+    shouldReject('crypto.subtle.encrypt(&quot;aes-cbc&quot;, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: true}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: 1}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: null}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: undefined}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: Symbol()}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: { }}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: &quot;foo&quot;}, key, plainText)');
+    // Wrong iv length
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;&quot;)}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;j&quot;)}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMrd&quot;)}, key, plainText)');
+
+    finishJSTest();
+});
+
+crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cfb-8&quot;, extractable, [&quot;encrypt&quot;]).then(function(result) {
+    key = result;
+    // Malformed AlgorithmIdentifiers
+    shouldReject('crypto.subtle.encrypt(&quot;aes-cfb-8&quot;, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cfb-8&quot;}, key, plainText)');
+    // Wrong iv length
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cfb-8&quot;, iv: asciiToUint8Array(&quot;&quot;)}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cfb-8&quot;, iv: asciiToUint8Array(&quot;j&quot;)}, key, plainText)');
+    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cfb-8&quot;, iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMrd&quot;)}, key, plainText)');
+
+    finishJSTest();
+});
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcdecryptmalformedparametersexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/crypto/subtle/aes-cbc-decrypt-malformed-parameters-expected.txt (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-decrypt-malformed-parameters-expected.txt        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-decrypt-malformed-parameters-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -1,12 +0,0 @@
</span><del>-Test decrypting using AES-CBC with malformed parameters
-
-On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
-
-
-PASS crypto.subtle.decrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;&quot;)}, key, cipherText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
-PASS crypto.subtle.decrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;j&quot;)}, key, cipherText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
-PASS crypto.subtle.decrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMrd&quot;)}, key, cipherText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcdecryptmalformedparametershtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/crypto/subtle/aes-cbc-decrypt-malformed-parameters.html (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-decrypt-malformed-parameters.html        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-decrypt-malformed-parameters.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -1,34 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-&lt;head&gt;
-&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
-&lt;/head&gt;
-&lt;body&gt;
-&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
-&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
-
-&lt;script&gt;
-description(&quot;Test decrypting using AES-CBC with malformed parameters&quot;);
-
-jsTestIsAsync = true;
-
-var extractable = false;
-var cipherText = hexStringToUint8Array(&quot;2ffa4618784dfd414b22c40c6330d022&quot;);
-var rawKey = asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;);
-
-crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cbc&quot;, extractable, [&quot;decrypt&quot;]).then(function(result) {
-    key = result;
-    // Wrong iv length
-    shouldReject('crypto.subtle.decrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;&quot;)}, key, cipherText)');
-    shouldReject('crypto.subtle.decrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;j&quot;)}, key, cipherText)');
-    shouldReject('crypto.subtle.decrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMrd&quot;)}, key, cipherText)');
-
-    finishJSTest();
-});
-
-&lt;/script&gt;
-
-&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcencryptmalformedparametersexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-malformed-parameters-expected.txt (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-malformed-parameters-expected.txt        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-malformed-parameters-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -1,21 +0,0 @@
</span><del>-Test encrypting using AES-CBC with malformed parameters
-
-On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
-
-
-PASS crypto.subtle.encrypt(&quot;aes-cbc&quot;, key, plainText) rejected promise  with TypeError: Member AesCbcParams.iv is required and must be an instance of BufferSource.
-PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;}, key, plainText) rejected promise  with TypeError: Member AesCbcParams.iv is required and must be an instance of BufferSource.
-PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: true}, key, plainText) rejected promise  with TypeError: Type error.
-PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: 1}, key, plainText) rejected promise  with TypeError: Type error.
-PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: null}, key, plainText) rejected promise  with TypeError: Type error.
-PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: undefined}, key, plainText) rejected promise  with TypeError: Member AesCbcParams.iv is required and must be an instance of BufferSource.
-PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: Symbol()}, key, plainText) rejected promise  with TypeError: Type error.
-PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: { }}, key, plainText) rejected promise  with TypeError: Type error.
-PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: &quot;foo&quot;}, key, plainText) rejected promise  with TypeError: Type error.
-PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;&quot;)}, key, plainText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
-PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;j&quot;)}, key, plainText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
-PASS crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMrd&quot;)}, key, plainText) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcencryptmalformedparametershtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-malformed-parameters.html (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-malformed-parameters.html        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-encrypt-malformed-parameters.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -1,44 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-&lt;head&gt;
-&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
-&lt;/head&gt;
-&lt;body&gt;
-&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
-&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
-
-&lt;script&gt;
-description(&quot;Test encrypting using AES-CBC with malformed parameters&quot;);
-
-jsTestIsAsync = true;
-
-var extractable = false;
-var plainText = asciiToUint8Array(&quot;Hello, World!&quot;);
-var rawKey = asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;);
-
-crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cbc&quot;, extractable, [&quot;encrypt&quot;]).then(function(result) {
-    key = result;
-    // Malformed AlgorithmIdentifiers
-    shouldReject('crypto.subtle.encrypt(&quot;aes-cbc&quot;, key, plainText)');
-    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;}, key, plainText)');
-    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: true}, key, plainText)');
-    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: 1}, key, plainText)');
-    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: null}, key, plainText)');
-    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: undefined}, key, plainText)');
-    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: Symbol()}, key, plainText)');
-    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: { }}, key, plainText)');
-    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: &quot;foo&quot;}, key, plainText)');
-    // Wrong iv length
-    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;&quot;)}, key, plainText)');
-    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;j&quot;)}, key, plainText)');
-    shouldReject('crypto.subtle.encrypt({name: &quot;aes-cbc&quot;, iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMrd&quot;)}, key, plainText)');
-
-    finishJSTest();
-});
-
-&lt;/script&gt;
-
-&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcimportkeyunwrapjwkrsakeypublicexpectedtxtfromrev212735trunkLayoutTestscryptosubtleaescbcimportkeyuwrapjwkrsakeypublicexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-unwrap-jwk-rsa-key-public-expected.txt (from rev 212735, trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-uwrap-jwk-rsa-key-public-expected.txt) (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-unwrap-jwk-rsa-key-public-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-unwrap-jwk-rsa-key-public-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+Test unwrapping a JWK RSA public key with AES-CBC using an imported key
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS unwrappedKey.kty is jwkKey.kty
+PASS unwrappedKey.alg is jwkKey.alg
+PASS unwrappedKey.key_ops is jwkKey.key_ops
+PASS unwrappedKey.ext is jwkKey.ext
+PASS unwrappedKey.n is jwkKey.n
+PASS unwrappedKey.e is jwkKey.e
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcimportkeyunwrapjwkrsakeypublichtmlfromrev212735trunkLayoutTestscryptosubtleaescbcimportkeyuwrapjwkrsakeypublichtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-unwrap-jwk-rsa-key-public.html (from rev 212735, trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-uwrap-jwk-rsa-key-public.html) (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-unwrap-jwk-rsa-key-public.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-unwrap-jwk-rsa-key-public.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test unwrapping a JWK RSA public key with AES-CBC using an imported key&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = true;
+var jwkKey = {
+    kty: &quot;RSA&quot;,
+    alg: &quot;RSA-OAEP&quot;,
+    use: &quot;enc&quot;,
+    key_ops: [&quot;encrypt&quot;],
+    ext: true,
+    n: &quot;rcCUCv7Oc1HVam1DIhCzqknThWawOp8QLk8Ziy2p10ByjQFCajoFiyuAWl-R1WXZaf4xitLRracT9agpzIzc-MbLSHIGgWQGO21lGiImy5ftZ-D8bHAqRz2y15pzD4c4CEou7XSSLDoRnR0QG5MsDhD6s2gV9mwHkrtkCxtMWdBi-77as8wGmlNRldcOSgZDLK8UnCSgA1OguZ989bFyc8tOOEIb0xUSfPSz3LPSCnyYz68aDjmKVeNH-ig857OScyWbGyEy3Biw64qun3juUlNWsJ3zngkOdteYWytx5Qr4XKNs6R-Myyq72KUp02mJDZiiyiglxML_i3-_CeecCw&quot;,
+    e: &quot;AQAB&quot;
+};
+var rawKey = asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;);
+var aesCbcParams = {
+    name: &quot;aes-cbc&quot;,
+    iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;),
+}
+var wrappedKey = hexStringToUint8Array( &quot;848aa2f70ee18e2953520132a79cf47946e00c99362340bb690edc9ab5315757462c128278c6232e770e7437c56ed722a8e1703855f7f3e565394e1a6a0305c4ef1b30fa4c7f72d1a239cc6c6ba067898798a36a75132c66b4a2d3fb942886affd3ea3b2756b0ddc886c01e3b93107469b82124468408ef8ab548b85aa8f206c312d74ce4f2c679eb147a275cefda64d5bdc4a2b5b90a4ac9ad3eb5f2cf19f5f87653211f59b4731ba61125582a233951097dea65db05899d587d1dcfccab9ab7410ab3010b89066506dbacbc6b73e4b564792751388fa0f58d55c59c14a08c9dfb0f78100b0f5cc29d62328822636d30a6a153ec5cd4727ad5e47b419c48544565637ac5789863d43b7da78cf4383d09d66e9d458e436dbfbee75e382b2bab49eec2c7491ff93cf099fe92feaf4658e30889fd12d3ae61cd5e8c8e1e56a079b662f90cd10cdbdbb4d12eefb36d825e1a043e82f5a98f8960d655d3f9ed5af31e581fa846cc582f6cee5c25e0b3c32050534ae957ce27860d470ba26da2c7d6fa621b0faa8becad58e9e55bb2a9d984b042f25df21482529870d271cbf5508a0edfc3cb37316c11f16b342bc1f1f98aa&quot;);
+
+
+crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cbc&quot;, extractable, [&quot;unwrapKey&quot;]).then(function(unwrappingKey) {
+    return crypto.subtle.unwrapKey(&quot;jwk&quot;, wrappedKey, unwrappingKey, aesCbcParams, {name: &quot;rsa-oaep&quot;, hash: &quot;sha-1&quot;}, extractable, [&quot;encrypt&quot;]);
+}).then(function(cryptoKey) {
+    return crypto.subtle.exportKey(&quot;jwk&quot;, cryptoKey);
+}).then(function(result) {
+    unwrappedKey = result;
+
+    shouldBe(&quot;unwrappedKey.kty&quot;, &quot;jwkKey.kty&quot;);
+    shouldBe(&quot;unwrappedKey.alg&quot;, &quot;jwkKey.alg&quot;);
+    shouldBe(&quot;unwrappedKey.key_ops&quot;, &quot;jwkKey.key_ops&quot;);
+    shouldBe(&quot;unwrappedKey.ext&quot;, &quot;jwkKey.ext&quot;);
+    shouldBe(&quot;unwrappedKey.n&quot;, &quot;jwkKey.n&quot;);
+    shouldBe(&quot;unwrappedKey.e&quot;, &quot;jwkKey.e&quot;);
+
+    finishJSTest();
+});
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcimportkeyuwrapjwkrsakeypublicexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-uwrap-jwk-rsa-key-public-expected.txt (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-uwrap-jwk-rsa-key-public-expected.txt        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-uwrap-jwk-rsa-key-public-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -1,15 +0,0 @@
</span><del>-Test unwrapping a JWK RSA public key with AES-CBC using an imported key
-
-On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
-
-
-PASS unwrappedKey.kty is jwkKey.kty
-PASS unwrappedKey.alg is jwkKey.alg
-PASS unwrappedKey.key_ops is jwkKey.key_ops
-PASS unwrappedKey.ext is jwkKey.ext
-PASS unwrappedKey.n is jwkKey.n
-PASS unwrappedKey.e is jwkKey.e
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescbcimportkeyuwrapjwkrsakeypublichtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-uwrap-jwk-rsa-key-public.html (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-uwrap-jwk-rsa-key-public.html        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-uwrap-jwk-rsa-key-public.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -1,55 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-&lt;head&gt;
-&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
-&lt;/head&gt;
-&lt;body&gt;
-&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
-&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
-
-&lt;script&gt;
-description(&quot;Test unwrapping a JWK RSA public key with AES-CBC using an imported key&quot;);
-
-jsTestIsAsync = true;
-
-var extractable = true;
-var jwkKey = {
-    kty: &quot;RSA&quot;,
-    alg: &quot;RSA-OAEP&quot;,
-    use: &quot;enc&quot;,
-    key_ops: [&quot;encrypt&quot;],
-    ext: true,
-    n: &quot;rcCUCv7Oc1HVam1DIhCzqknThWawOp8QLk8Ziy2p10ByjQFCajoFiyuAWl-R1WXZaf4xitLRracT9agpzIzc-MbLSHIGgWQGO21lGiImy5ftZ-D8bHAqRz2y15pzD4c4CEou7XSSLDoRnR0QG5MsDhD6s2gV9mwHkrtkCxtMWdBi-77as8wGmlNRldcOSgZDLK8UnCSgA1OguZ989bFyc8tOOEIb0xUSfPSz3LPSCnyYz68aDjmKVeNH-ig857OScyWbGyEy3Biw64qun3juUlNWsJ3zngkOdteYWytx5Qr4XKNs6R-Myyq72KUp02mJDZiiyiglxML_i3-_CeecCw&quot;,
-    e: &quot;AQAB&quot;
-};
-var rawKey = asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;);
-var aesCbcParams = {
-    name: &quot;aes-cbc&quot;,
-    iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;),
-}
-var wrappedKey = hexStringToUint8Array( &quot;848aa2f70ee18e2953520132a79cf47946e00c99362340bb690edc9ab5315757462c128278c6232e770e7437c56ed722a8e1703855f7f3e565394e1a6a0305c4ef1b30fa4c7f72d1a239cc6c6ba067898798a36a75132c66b4a2d3fb942886affd3ea3b2756b0ddc886c01e3b93107469b82124468408ef8ab548b85aa8f206c312d74ce4f2c679eb147a275cefda64d5bdc4a2b5b90a4ac9ad3eb5f2cf19f5f87653211f59b4731ba61125582a233951097dea65db05899d587d1dcfccab9ab7410ab3010b89066506dbacbc6b73e4b564792751388fa0f58d55c59c14a08c9dfb0f78100b0f5cc29d62328822636d30a6a153ec5cd4727ad5e47b419c48544565637ac5789863d43b7da78cf4383d09d66e9d458e436dbfbee75e382b2bab49eec2c7491ff93cf099fe92feaf4658e30889fd12d3ae61cd5e8c8e1e56a079b662f90cd10cdbdbb4d12eefb36d825e1a043e82f5a98f8960d655d3f9ed5af31e581fa846cc582f6cee5c25e0b3c32050534ae957ce27860d470ba26da2c7d6fa621b0faa8becad58e9e55bb2a9d984b042f25df21482529870d271cbf5508a0edfc3cb37316c11f16b342bc1f1f98aa&quot;);
-
-
-crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cbc&quot;, extractable, [&quot;unwrapKey&quot;]).then(function(unwrappingKey) {
-    return crypto.subtle.unwrapKey(&quot;jwk&quot;, wrappedKey, unwrappingKey, aesCbcParams, {name: &quot;rsa-oaep&quot;, hash: &quot;sha-1&quot;}, extractable, [&quot;encrypt&quot;]);
-}).then(function(cryptoKey) {
-    return crypto.subtle.exportKey(&quot;jwk&quot;, cryptoKey);
-}).then(function(result) {
-    unwrappedKey = result;
-
-    shouldBe(&quot;unwrappedKey.kty&quot;, &quot;jwkKey.kty&quot;);
-    shouldBe(&quot;unwrappedKey.alg&quot;, &quot;jwkKey.alg&quot;);
-    shouldBe(&quot;unwrappedKey.key_ops&quot;, &quot;jwkKey.key_ops&quot;);
-    shouldBe(&quot;unwrappedKey.ext&quot;, &quot;jwkKey.ext&quot;);
-    shouldBe(&quot;unwrappedKey.n&quot;, &quot;jwkKey.n&quot;);
-    shouldBe(&quot;unwrappedKey.e&quot;, &quot;jwkKey.e&quot;);
-
-    finishJSTest();
-});
-
-&lt;/script&gt;
-
-&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbgenerateexportkeyjwklength128expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-128-expected.txt (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-128-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-128-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+Test exporting a 128 bits AES-CFB key with JWK format
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Generating a key...
+Exporting a key...
+PASS key.kty is 'oct'
+PASS key.key_ops is ['decrypt', 'encrypt', 'unwrapKey', 'wrapKey']
+PASS key.alg is 'A128CFB8'
+PASS key.ext is true
+PASS Base64URL.parse(key.k).byteLength is 16
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbgenerateexportkeyjwklength128html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-128.html (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-128.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-128.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test exporting a 128 bits AES-CFB key with JWK format&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = true;
+
+debug(&quot;Generating a key...&quot;);
+crypto.subtle.generateKey({name: &quot;aes-cfb-8&quot;, length: 128}, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;, &quot;wrapKey&quot;, &quot;unwrapKey&quot;]).then(function(key) {
+    debug(&quot;Exporting a key...&quot;);
+    return crypto.subtle.exportKey(&quot;jwk&quot;, key);
+}).then(function(result) {
+    key = result;
+
+    shouldBe(&quot;key.kty&quot;, &quot;'oct'&quot;);
+    shouldBe(&quot;key.key_ops&quot;, &quot;['decrypt', 'encrypt', 'unwrapKey', 'wrapKey']&quot;);
+    shouldBe(&quot;key.alg&quot;, &quot;'A128CFB8'&quot;);
+    shouldBe(&quot;key.ext&quot;, &quot;true&quot;);
+    shouldBe(&quot;Base64URL.parse(key.k).byteLength&quot;, &quot;16&quot;);
+
+    finishJSTest();
+});
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbgenerateexportkeyjwklength192expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-192-expected.txt (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-192-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-192-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+Test exporting a 192 bits AES-CFB key with JWK format
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Generating a key...
+Exporting a key...
+PASS key.kty is 'oct'
+PASS key.key_ops is ['decrypt', 'encrypt', 'unwrapKey', 'wrapKey']
+PASS key.alg is 'A192CFB8'
+PASS key.ext is true
+PASS Base64URL.parse(key.k).byteLength is 24
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbgenerateexportkeyjwklength192html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-192.html (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-192.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-192.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test exporting a 192 bits AES-CFB key with JWK format&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = true;
+
+debug(&quot;Generating a key...&quot;);
+crypto.subtle.generateKey({name: &quot;aes-cfb-8&quot;, length: 192}, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;, &quot;wrapKey&quot;, &quot;unwrapKey&quot;]).then(function(key) {
+    debug(&quot;Exporting a key...&quot;);
+    return crypto.subtle.exportKey(&quot;jwk&quot;, key);
+}).then(function(result) {
+    key = result;
+
+    shouldBe(&quot;key.kty&quot;, &quot;'oct'&quot;);
+    shouldBe(&quot;key.key_ops&quot;, &quot;['decrypt', 'encrypt', 'unwrapKey', 'wrapKey']&quot;);
+    shouldBe(&quot;key.alg&quot;, &quot;'A192CFB8'&quot;);
+    shouldBe(&quot;key.ext&quot;, &quot;true&quot;);
+    shouldBe(&quot;Base64URL.parse(key.k).byteLength&quot;, &quot;24&quot;);
+
+    finishJSTest();
+});
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbgenerateexportkeyjwklength256expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-256-expected.txt (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-256-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-256-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+Test exporting a 256 bits AES-CFB key with JWK format
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Generating a key...
+Exporting a key...
+PASS key.kty is 'oct'
+PASS key.key_ops is ['decrypt', 'encrypt', 'unwrapKey', 'wrapKey']
+PASS key.alg is 'A256CFB8'
+PASS key.ext is true
+PASS Base64URL.parse(key.k).byteLength is 32
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbgenerateexportkeyjwklength256html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-256.html (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-256.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-key-jwk-length-256.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test exporting a 256 bits AES-CFB key with JWK format&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = true;
+
+debug(&quot;Generating a key...&quot;);
+crypto.subtle.generateKey({name: &quot;aes-cfb-8&quot;, length: 256}, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;, &quot;wrapKey&quot;, &quot;unwrapKey&quot;]).then(function(key) {
+    debug(&quot;Exporting a key...&quot;);
+    return crypto.subtle.exportKey(&quot;jwk&quot;, key);
+}).then(function(result) {
+    key = result;
+
+    shouldBe(&quot;key.kty&quot;, &quot;'oct'&quot;);
+    shouldBe(&quot;key.key_ops&quot;, &quot;['decrypt', 'encrypt', 'unwrapKey', 'wrapKey']&quot;);
+    shouldBe(&quot;key.alg&quot;, &quot;'A256CFB8'&quot;);
+    shouldBe(&quot;key.ext&quot;, &quot;true&quot;);
+    shouldBe(&quot;Base64URL.parse(key.k).byteLength&quot;, &quot;32&quot;);
+
+    finishJSTest();
+});
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbgenerateexportrawkeyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-raw-key-expected.txt (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-raw-key-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-raw-key-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+Test exporting a 256 bits AES-CFB key with raw format
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Generating a key...
+Exporting a key...
+PASS key.byteLength is 32
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbgenerateexportrawkeyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-raw-key.html (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-raw-key.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-generate-export-raw-key.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test exporting a 256 bits AES-CFB key with raw format&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = true;
+
+debug(&quot;Generating a key...&quot;);
+crypto.subtle.generateKey({name: &quot;aes-cfb-8&quot;, length: 256}, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;, &quot;wrapKey&quot;, &quot;unwrapKey&quot;]).then(function(key) {
+    debug(&quot;Exporting a key...&quot;);
+    return crypto.subtle.exportKey(&quot;raw&quot;, key);
+}).then(function(result) {
+    key = result;
+
+    shouldBe(&quot;key.byteLength&quot;, &quot;32&quot;);
+
+    finishJSTest();
+});
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbgeneratekeyencryptdecryptexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-generate-key-encrypt-decrypt-expected.txt (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-generate-key-encrypt-decrypt-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-generate-key-encrypt-decrypt-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+Test encrypting&amp;decrypting using AES-CFB algorithm with a generated 256bit key
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Generating a key...
+Encrypting...
+PASS bytesToASCIIString(cipherText) is not &quot;Hello, World!&quot;
+Decrypting...
+PASS bytesToASCIIString(decryptedText) is plainText
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbgeneratekeyencryptdecrypthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-generate-key-encrypt-decrypt.html (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-generate-key-encrypt-decrypt.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-generate-key-encrypt-decrypt.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test encrypting&amp;decrypting using AES-CFB algorithm with a generated 256bit key&quot;);
+
+jsTestIsAsync = true;
+var plainText = &quot;Hello, World!&quot;;
+var aesCfbParams = {
+    name: &quot;aes-cfb-8&quot;,
+    iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;),
+}
+
+debug(&quot;Generating a key...&quot;);
+crypto.subtle.generateKey({name: &quot;aes-cfb-8&quot;, length: 256}, true, [&quot;decrypt&quot;, &quot;encrypt&quot;]).then(function(result) {
+    key = result;
+    debug(&quot;Encrypting...&quot;);
+    return crypto.subtle.encrypt(aesCfbParams, key, asciiToUint8Array(plainText));
+}).then(function(result) {
+    cipherText = result;
+    shouldNotBeEqualToString(&quot;bytesToASCIIString(cipherText)&quot;, plainText);
+    debug(&quot;Decrypting...&quot;);
+    return crypto.subtle.decrypt(aesCfbParams, key, cipherText);
+}).then(function(result) {
+    decryptedText = result;
+
+    shouldBe(&quot;bytesToASCIIString(decryptedText)&quot;, &quot;plainText&quot;);
+
+    finishJSTest();
+});
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbgeneratekeyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-generate-key-expected.txt (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-generate-key-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-generate-key-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+Test generating an AES key with length 128 using AES-CFB algorithm.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Generating a key...
+PASS key.type is 'secret'
+PASS key.extractable is true
+PASS key.algorithm.name is 'AES-CFB-8'
+PASS key.algorithm.length is 128
+PASS key.usages is ['decrypt', 'encrypt', 'unwrapKey', 'wrapKey']
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbgeneratekeyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-generate-key.html (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-generate-key.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-generate-key.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test generating an AES key with length 128 using AES-CFB algorithm.&quot;);
+
+jsTestIsAsync = true;
+
+debug(&quot;Generating a key...&quot;);
+crypto.subtle.generateKey({name: &quot;aes-cfb-8&quot;, length: 128}, true, [&quot;encrypt&quot;, &quot;decrypt&quot;, &quot;unwrapKey&quot;, &quot;wrapKey&quot;]).then(function(result) {
+    key = result;
+
+    shouldBe(&quot;key.type&quot;, &quot;'secret'&quot;);
+    shouldBe(&quot;key.extractable&quot;, &quot;true&quot;);
+    shouldBe(&quot;key.algorithm.name&quot;, &quot;'AES-CFB-8'&quot;);
+    shouldBe(&quot;key.algorithm.length&quot;, &quot;128&quot;);
+    shouldBe(&quot;key.usages&quot;, &quot;['decrypt', 'encrypt', 'unwrapKey', 'wrapKey']&quot;);
+
+    finishJSTest();
+});
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbimportjwkkeylength128expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-128-expected.txt (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-128-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-128-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+Test importing a JWK AES-CFB key with legnth 128
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Importing a key...
+PASS key.type is 'secret'
+PASS key.extractable is true
+PASS key.algorithm.name is 'AES-CFB-8'
+PASS key.algorithm.length is 128
+PASS key.usages is ['decrypt', 'encrypt', 'unwrapKey', 'wrapKey']
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbimportjwkkeylength128html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-128.html (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-128.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-128.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test importing a JWK AES-CFB key with legnth 128&quot;);
+
+jsTestIsAsync = true;
+
+var jwkKey = {
+    kty: &quot;oct&quot;,
+    k: &quot;YWJjZGVmZ2gxMjM0NTY3OA&quot;,
+    alg: &quot;A128CFB8&quot;,
+};
+var extractable = true;
+
+debug(&quot;Importing a key...&quot;);
+crypto.subtle.importKey(&quot;jwk&quot;, jwkKey, &quot;aes-cfb-8&quot;, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;, &quot;wrapKey&quot;, &quot;unwrapKey&quot;]).then(function(result) {
+    key = result;
+
+    shouldBe(&quot;key.type&quot;, &quot;'secret'&quot;);
+    shouldBe(&quot;key.extractable&quot;, &quot;true&quot;);
+    shouldBe(&quot;key.algorithm.name&quot;, &quot;'AES-CFB-8'&quot;);
+    shouldBe(&quot;key.algorithm.length&quot;, &quot;128&quot;);
+    shouldBe(&quot;key.usages&quot;, &quot;['decrypt', 'encrypt', 'unwrapKey', 'wrapKey']&quot;);
+
+    finishJSTest();
+});
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbimportjwkkeylength192expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-192-expected.txt (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-192-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-192-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+Test importing a JWK AES-CFB key with legnth 192
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Importing a key...
+PASS key.type is 'secret'
+PASS key.extractable is true
+PASS key.algorithm.name is 'AES-CFB-8'
+PASS key.algorithm.length is 192
+PASS key.usages is ['decrypt', 'encrypt', 'unwrapKey', 'wrapKey']
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbimportjwkkeylength192html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-192.html (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-192.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-192.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test importing a JWK AES-CFB key with legnth 192&quot;);
+
+jsTestIsAsync = true;
+
+var jwkKey = {
+    kty: &quot;oct&quot;,
+    k: &quot;A72FD48989ED7E92A3B3A080F74FA80B&quot;,
+    alg: &quot;A192CFB8&quot;,
+};
+var extractable = true;
+
+debug(&quot;Importing a key...&quot;);
+crypto.subtle.importKey(&quot;jwk&quot;, jwkKey, &quot;aes-cfb-8&quot;, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;, &quot;wrapKey&quot;, &quot;unwrapKey&quot;]).then(function(result) {
+    key = result;
+
+    shouldBe(&quot;key.type&quot;, &quot;'secret'&quot;);
+    shouldBe(&quot;key.extractable&quot;, &quot;true&quot;);
+    shouldBe(&quot;key.algorithm.name&quot;, &quot;'AES-CFB-8'&quot;);
+    shouldBe(&quot;key.algorithm.length&quot;, &quot;192&quot;);
+    shouldBe(&quot;key.usages&quot;, &quot;['decrypt', 'encrypt', 'unwrapKey', 'wrapKey']&quot;);
+
+    finishJSTest();
+});
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbimportjwkkeylength256expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-256-expected.txt (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-256-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-256-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+Test importing a JWK AES-CFB key with legnth 256
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Importing a key...
+PASS key.type is 'secret'
+PASS key.extractable is true
+PASS key.algorithm.name is 'AES-CFB-8'
+PASS key.algorithm.length is 256
+PASS key.usages is ['decrypt', 'encrypt', 'unwrapKey', 'wrapKey']
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbimportjwkkeylength256html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-256.html (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-256.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-import-jwk-key-length-256.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test importing a JWK AES-CFB key with legnth 256&quot;);
+
+jsTestIsAsync = true;
+
+var jwkKey = {
+    kty: &quot;oct&quot;,
+    k: &quot;YWJjZGVmZ2gxMjM0NTY3OGFiY2RlZmdoMTIzNDU2Nzg&quot;,
+    alg: &quot;A256CFB8&quot;,
+};
+var extractable = true;
+
+debug(&quot;Importing a key...&quot;);
+crypto.subtle.importKey(&quot;jwk&quot;, jwkKey, &quot;aes-cfb-8&quot;, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;, &quot;wrapKey&quot;, &quot;unwrapKey&quot;]).then(function(result) {
+    key = result;
+
+    shouldBe(&quot;key.type&quot;, &quot;'secret'&quot;);
+    shouldBe(&quot;key.extractable&quot;, &quot;true&quot;);
+    shouldBe(&quot;key.algorithm.name&quot;, &quot;'AES-CFB-8'&quot;);
+    shouldBe(&quot;key.algorithm.length&quot;, &quot;256&quot;);
+    shouldBe(&quot;key.usages&quot;, &quot;['decrypt', 'encrypt', 'unwrapKey', 'wrapKey']&quot;);
+
+    finishJSTest();
+});
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbimportkeydecryptexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-decrypt-expected.txt (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-decrypt-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-decrypt-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+Test decrypting using AES-CFB with an imported 128bit key
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS bytesToASCIIString(plainText) is expectedPlainText
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbimportkeydecrypthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-decrypt.html (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-decrypt.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-decrypt.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test decrypting using AES-CFB with an imported 128bit key&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = false;
+var cipherText = hexStringToUint8Array(&quot;a572525a0baef88e6f5b198c6f&quot;);
+var aesCfbParams = {
+    name: &quot;aes-cfb-8&quot;,
+    iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;),
+}
+var rawKey = asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;);
+var expectedPlainText = &quot;Hello, World!&quot;;
+
+crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cfb-8&quot;, extractable, [&quot;decrypt&quot;]).then(function(key) {
+    return crypto.subtle.decrypt(aesCfbParams, key, cipherText);
+}).then(function(result) {
+    plainText = result;
+
+    shouldBe(&quot;bytesToASCIIString(plainText)&quot;, &quot;expectedPlainText&quot;);
+
+    finishJSTest();
+});
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbimportkeyencryptexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-encrypt-expected.txt (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-encrypt-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-encrypt-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+Test encrypting using AES-CFB with an imported 128bit key
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS bytesToHexString(cipherText) is expectedCipherText
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbimportkeyencrypthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-encrypt.html (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-encrypt.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-encrypt.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test encrypting using AES-CFB with an imported 128bit key&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = false;
+var plainText = asciiToUint8Array(&quot;Hello, World!&quot;);
+var aesCfbParams = {
+    name: &quot;aes-cfb-8&quot;,
+    iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;),
+}
+var rawKey = asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;);
+var expectedCipherText = &quot;a572525a0baef88e6f5b198c6f&quot;;
+
+crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cfb-8&quot;, extractable, [&quot;encrypt&quot;]).then(function(key) {
+    return crypto.subtle.encrypt(aesCfbParams, key, plainText);
+}).then(function(result) {
+    cipherText = result;
+
+    shouldBe(&quot;bytesToHexString(cipherText)&quot;, &quot;expectedCipherText&quot;);
+
+    finishJSTest();
+});
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbimportkeyunwrapjwkkeyexpectedtxtfromrev212735trunkLayoutTestscryptosubtleaescbcimportkeyuwrapjwkrsakeypublicexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-unwrap-jwk-key-expected.txt (from rev 212735, trunk/LayoutTests/crypto/subtle/aes-cbc-import-key-uwrap-jwk-rsa-key-public-expected.txt) (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-unwrap-jwk-key-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-unwrap-jwk-key-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+Test unwrapping a JWK key with AES-CFB using an imported key
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS unwrappedKey.kty is jwkKey.kty
+PASS unwrappedKey.alg is jwkKey.alg
+PASS unwrappedKey.key_ops is jwkKey.key_ops
+PASS unwrappedKey.ext is jwkKey.ext
+PASS unwrappedKey.k is jwkKey.k
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbimportkeyunwrapjwkkeyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-unwrap-jwk-key.html (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-unwrap-jwk-key.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-unwrap-jwk-key.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test unwrapping a JWK key with AES-CFB using an imported key&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = true;
+var rawKey = asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;);
+var jwkKey = {
+    kty: &quot;oct&quot;,
+    alg: &quot;A128CBC&quot;,
+    use: &quot;enc&quot;,
+    key_ops: [&quot;encrypt&quot;],
+    ext: true,
+    k: &quot;am5Pdzk5b09aRkxJRVBNcg&quot;,
+};
+var aesCfbParams = {
+    name: &quot;aes-cfb-8&quot;,
+    iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;),
+}
+var wrappedKey = hexStringToUint8Array(&quot;96a1740c58cb039ce9d3f77c4031efc6e3c16adbc1ce9a1b0d5bc5b953e2d9de3f5413b01b940477fd80cee9f49e09c38ce965c2040a3fc1449ba4f2b6c03386acd2b2a145e335e1890c4ac351b4702d07b6ea330cce9d44af7e2a&quot;);
+
+
+crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cfb-8&quot;, extractable, [&quot;unwrapKey&quot;]).then(function(unwrappingKey) {
+    return crypto.subtle.unwrapKey(&quot;jwk&quot;, wrappedKey, unwrappingKey, aesCfbParams, {name: &quot;aes-cbc&quot;}, extractable, [&quot;encrypt&quot;]);
+}).then(function(cryptoKey) {
+    return crypto.subtle.exportKey(&quot;jwk&quot;, cryptoKey);
+}).then(function(result) {
+    unwrappedKey = result;
+
+    shouldBe(&quot;unwrappedKey.kty&quot;, &quot;jwkKey.kty&quot;);
+    shouldBe(&quot;unwrappedKey.alg&quot;, &quot;jwkKey.alg&quot;);
+    shouldBe(&quot;unwrappedKey.key_ops&quot;, &quot;jwkKey.key_ops&quot;);
+    shouldBe(&quot;unwrappedKey.ext&quot;, &quot;jwkKey.ext&quot;);
+    shouldBe(&quot;unwrappedKey.k&quot;, &quot;jwkKey.k&quot;);
+
+    finishJSTest();
+});
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbimportkeyunwraprawkeyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-unwrap-raw-key-expected.txt (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-unwrap-raw-key-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-unwrap-raw-key-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+Test unwrapping a raw key with AES-CFB using an imported key
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS bytesToASCIIString(unwrappedKey) is expectedRawKey
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbimportkeyunwraprawkeyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-unwrap-raw-key.html (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-unwrap-raw-key.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-unwrap-raw-key.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test unwrapping a raw key with AES-CFB using an imported key&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = true;
+var expectedRawKey = &quot;jnOw99oOZFLIEPMr&quot;;
+var rawKey = asciiToUint8Array(expectedRawKey);
+var aesCfbParams = {
+    name: &quot;aes-cfb-8&quot;,
+    iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;),
+}
+var wrappedKey = hexStringToUint8Array(&quot;8707ee311f6e8ed157885a7fc25f0ee7&quot;);
+
+
+crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cfb-8&quot;, extractable, [&quot;unwrapKey&quot;]).then(function(unwrappingKey) {
+    return crypto.subtle.unwrapKey(&quot;raw&quot;, wrappedKey, unwrappingKey, aesCfbParams, {name: &quot;aes-cbc&quot;}, extractable, [&quot;encrypt&quot;]);
+}).then(function(cryptoKey) {
+    return crypto.subtle.exportKey(&quot;raw&quot;, cryptoKey);
+}).then(function(result) {
+    unwrappedKey = result;
+
+    shouldBe(&quot;bytesToASCIIString(unwrappedKey)&quot;, &quot;expectedRawKey&quot;);
+
+    finishJSTest();
+});
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbimportkeywrapjwkkeyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-wrap-jwk-key-expected.txt (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-wrap-jwk-key-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-wrap-jwk-key-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+Test wrapping a JWK key with AES-CFB using an imported key
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS bytesToHexString(wrappedKey) is expectWrappedKey
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbimportkeywrapjwkkeyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-wrap-jwk-key.html (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-wrap-jwk-key.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-wrap-jwk-key.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test wrapping a JWK key with AES-CFB using an imported key&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = true;
+var rawKey = asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;);
+var aesCfbParams = {
+    name: &quot;aes-cfb-8&quot;,
+    iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;),
+}
+var expectWrappedKey = &quot;96a17ede3414d990741d2fe5f1d93e74999ed6ca6071db6dc0cf0bcf9178b1ac037076d18ffe0e247ee570c2d551bc7621b0d791df9c7bc7c021ea1fda83e4c41d8704112777a86413dd7b20088479a615b83942d3903ef08f81f4&quot;;
+
+crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cfb-8&quot;, extractable, [&quot;wrapKey&quot;]).then(function(result) {
+    wrappingKey = result;
+    return crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cbc&quot;, extractable, [&quot;encrypt&quot;]);
+}).then(function(result) {
+    key = result;
+    return crypto.subtle.wrapKey(&quot;jwk&quot;, key, wrappingKey, aesCfbParams);
+}).then(function(result) {
+    wrappedKey = result;
+
+    shouldBe(&quot;bytesToHexString(wrappedKey)&quot;, &quot;expectWrappedKey&quot;);
+
+    finishJSTest();
+});
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbimportkeywraprawkeyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-wrap-raw-key-expected.txt (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-wrap-raw-key-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-wrap-raw-key-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+Test wrapping a raw key with AES-CFB using an imported key
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS bytesToHexString(wrappedKey) is expectWrappedKey
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbimportkeywraprawkeyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-wrap-raw-key.html (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-wrap-raw-key.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-import-key-wrap-raw-key.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test wrapping a raw key with AES-CFB using an imported key&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = true;
+var rawKey = asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;);
+var aesCfbParams = {
+    name: &quot;aes-cfb-8&quot;,
+    iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;),
+}
+var expectWrappedKey = &quot;8707ee311f6e8ed157885a7fc25f0ee7&quot;;
+
+crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cfb-8&quot;, extractable, [&quot;wrapKey&quot;]).then(function(result) {
+    wrappingKey = result;
+    return crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cbc&quot;, extractable, [&quot;encrypt&quot;]);
+}).then(function(result) {
+    key = result;
+    return crypto.subtle.wrapKey(&quot;raw&quot;, key, wrappingKey, aesCfbParams);
+}).then(function(result) {
+    wrappedKey = result;
+
+    shouldBe(&quot;bytesToHexString(wrappedKey)&quot;, &quot;expectWrappedKey&quot;);
+
+    finishJSTest();
+});
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbimportrawkeyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-import-raw-key-expected.txt (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-import-raw-key-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-import-raw-key-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+Test importing a raw AES-CFB key with legnth 128
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Importing a key...
+PASS key.type is 'secret'
+PASS key.extractable is true
+PASS key.algorithm.name is 'AES-CFB-8'
+PASS key.algorithm.length is 128
+PASS key.usages is ['decrypt', 'encrypt', 'unwrapKey', 'wrapKey']
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaescfbimportrawkeyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/subtle/aes-cfb-import-raw-key.html (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-cfb-import-raw-key.html                                (rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-cfb-import-raw-key.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/common.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+description(&quot;Test importing a raw AES-CFB key with legnth 128&quot;);
+
+jsTestIsAsync = true;
+
+var rawKey = asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;);
+var extractable = true;
+
+debug(&quot;Importing a key...&quot;);
+crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cfb-8&quot;, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;, &quot;wrapKey&quot;, &quot;unwrapKey&quot;]).then(function(result) {
+    key = result;
+
+    shouldBe(&quot;key.type&quot;, &quot;'secret'&quot;);
+    shouldBe(&quot;key.extractable&quot;, &quot;true&quot;);
+    shouldBe(&quot;key.algorithm.name&quot;, &quot;'AES-CFB-8'&quot;);
+    shouldBe(&quot;key.algorithm.length&quot;, &quot;128&quot;);
+    shouldBe(&quot;key.usages&quot;, &quot;['decrypt', 'encrypt', 'unwrapKey', 'wrapKey']&quot;);
+
+    finishJSTest();
+});
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaesgeneratekeymalformedparametersexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-generate-key-malformed-parameters-expected.txt (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-generate-key-malformed-parameters-expected.txt        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/LayoutTests/crypto/subtle/aes-generate-key-malformed-parameters-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -21,6 +21,10 @@
</span><span class="cx"> PASS crypto.subtle.generateKey({name: &quot;aes-kw&quot;, length: 128}, extractable, [&quot;verify&quot;]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
</span><span class="cx"> PASS crypto.subtle.generateKey({name: &quot;aes-kw&quot;, length: 128}, extractable, [&quot;deriveKey&quot;]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
</span><span class="cx"> PASS crypto.subtle.generateKey({name: &quot;aes-kw&quot;, length: 128}, extractable, [&quot;deriveBits&quot;]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
</span><ins>+PASS crypto.subtle.generateKey({name: &quot;aes-cfb-8&quot;, length: 128}, extractable, [&quot;sign&quot;]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: &quot;aes-cfb-8&quot;, length: 128}, extractable, [&quot;verify&quot;]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: &quot;aes-cfb-8&quot;, length: 128}, extractable, [&quot;deriveKey&quot;]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
+PASS crypto.subtle.generateKey({name: &quot;aes-cfb-8&quot;, length: 128}, extractable, [&quot;deriveBits&quot;]) rejected promise  with SyntaxError (DOM Exception 12): A required parameter was missing or out-of-range.
</ins><span class="cx"> PASS crypto.subtle.generateKey({name: &quot;aes-cbc&quot;, length: 111}, extractable, [&quot;encrypt&quot;]) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
</span><span class="cx"> PASS crypto.subtle.generateKey({name: &quot;aes-kw&quot;, length: 111}, extractable, [&quot;wrapKey&quot;]) rejected promise  with OperationError (DOM Exception 34): The operation failed for an operation-specific reason.
</span><span class="cx"> PASS successfullyParsed is true
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaesgeneratekeymalformedparametershtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-generate-key-malformed-parameters.html (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-generate-key-malformed-parameters.html        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/LayoutTests/crypto/subtle/aes-generate-key-malformed-parameters.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -33,6 +33,10 @@
</span><span class="cx"> shouldReject('crypto.subtle.generateKey({name: &quot;aes-kw&quot;, length: 128}, extractable, [&quot;verify&quot;])');
</span><span class="cx"> shouldReject('crypto.subtle.generateKey({name: &quot;aes-kw&quot;, length: 128}, extractable, [&quot;deriveKey&quot;])');
</span><span class="cx"> shouldReject('crypto.subtle.generateKey({name: &quot;aes-kw&quot;, length: 128}, extractable, [&quot;deriveBits&quot;])');
</span><ins>+shouldReject('crypto.subtle.generateKey({name: &quot;aes-cfb-8&quot;, length: 128}, extractable, [&quot;sign&quot;])');
+shouldReject('crypto.subtle.generateKey({name: &quot;aes-cfb-8&quot;, length: 128}, extractable, [&quot;verify&quot;])');
+shouldReject('crypto.subtle.generateKey({name: &quot;aes-cfb-8&quot;, length: 128}, extractable, [&quot;deriveKey&quot;])');
+shouldReject('crypto.subtle.generateKey({name: &quot;aes-cfb-8&quot;, length: 128}, extractable, [&quot;deriveBits&quot;])');
</ins><span class="cx"> // Wrong length
</span><span class="cx"> shouldReject('crypto.subtle.generateKey({name: &quot;aes-cbc&quot;, length: 111}, extractable, [&quot;encrypt&quot;])');
</span><span class="cx"> shouldReject('crypto.subtle.generateKey({name: &quot;aes-kw&quot;, length: 111}, extractable, [&quot;wrapKey&quot;])');
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaesimportkeymalformedparametersexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-import-key-malformed-parameters-expected.txt (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-import-key-malformed-parameters-expected.txt        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/LayoutTests/crypto/subtle/aes-import-key-malformed-parameters-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -20,6 +20,10 @@
</span><span class="cx"> PASS crypto.subtle.importKey(&quot;jwk&quot;, {kty: &quot;oct&quot;, k: k128, alg: &quot;&quot;}, &quot;aes-kw&quot;, extractable, [&quot;wrapKey&quot;, &quot;unwrapKey&quot;]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
</span><span class="cx"> PASS crypto.subtle.importKey(&quot;jwk&quot;, {kty: &quot;oct&quot;, k: k192, alg: &quot;&quot;}, &quot;aes-kw&quot;, extractable, [&quot;wrapKey&quot;, &quot;unwrapKey&quot;]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
</span><span class="cx"> PASS crypto.subtle.importKey(&quot;jwk&quot;, {kty: &quot;oct&quot;, k: k256, alg: &quot;&quot;}, &quot;aes-kw&quot;, extractable, [&quot;wrapKey&quot;, &quot;unwrapKey&quot;]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
</span><ins>+PASS crypto.subtle.importKey(&quot;jwk&quot;, {kty: &quot;oct&quot;, k: k128, alg: &quot;A192CFB8&quot;}, &quot;aes-cfb-8&quot;, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;, &quot;wrapKey&quot;, &quot;unwrapKey&quot;]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey(&quot;jwk&quot;, {kty: &quot;oct&quot;, k: k192, alg: &quot;A256CFB8&quot;}, &quot;aes-cfb-8&quot;, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;, &quot;wrapKey&quot;, &quot;unwrapKey&quot;]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey(&quot;jwk&quot;, {kty: &quot;oct&quot;, k: k256, alg: &quot;A128CFB8&quot;}, &quot;aes-cfb-8&quot;, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;, &quot;wrapKey&quot;, &quot;unwrapKey&quot;]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
+PASS crypto.subtle.importKey(&quot;jwk&quot;, {kty: &quot;oct&quot;, k: &quot;A72F&quot;, alg: &quot;foo&quot;}, &quot;aes-cbc&quot;, extractable, [&quot;wrapKey&quot;, &quot;unwrapKey&quot;]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
</ins><span class="cx"> PASS crypto.subtle.importKey(&quot;jwk&quot;, {kty: &quot;oct&quot;, k: &quot;!!!&quot;, alg: &quot;foo&quot;}, &quot;aes-cbc&quot;, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;, &quot;wrapKey&quot;, &quot;unwrapKey&quot;]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
</span><span class="cx"> PASS crypto.subtle.importKey(&quot;jwk&quot;, {kty: &quot;oct&quot;, k: &quot;&quot;, alg: &quot;foo&quot;}, &quot;aes-cbc&quot;, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;, &quot;wrapKey&quot;, &quot;unwrapKey&quot;]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
</span><span class="cx"> PASS crypto.subtle.importKey(&quot;jwk&quot;, {kty: &quot;oct&quot;, k: k128, alg: &quot;A128CBC&quot;, use: &quot;sig&quot;}, &quot;aes-cbc&quot;, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;, &quot;wrapKey&quot;, &quot;unwrapKey&quot;]) rejected promise  with DataError (DOM Exception 30): Data provided to an operation does not meet requirements.
</span></span></pre></div>
<a id="trunkLayoutTestscryptosubtleaesimportkeymalformedparametershtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/crypto/subtle/aes-import-key-malformed-parameters.html (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/subtle/aes-import-key-malformed-parameters.html        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/LayoutTests/crypto/subtle/aes-import-key-malformed-parameters.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -37,6 +37,10 @@
</span><span class="cx"> shouldReject('crypto.subtle.importKey(&quot;jwk&quot;, {kty: &quot;oct&quot;, k: k128, alg: &quot;&quot;}, &quot;aes-kw&quot;, extractable, [&quot;wrapKey&quot;, &quot;unwrapKey&quot;])');
</span><span class="cx"> shouldReject('crypto.subtle.importKey(&quot;jwk&quot;, {kty: &quot;oct&quot;, k: k192, alg: &quot;&quot;}, &quot;aes-kw&quot;, extractable, [&quot;wrapKey&quot;, &quot;unwrapKey&quot;])');
</span><span class="cx"> shouldReject('crypto.subtle.importKey(&quot;jwk&quot;, {kty: &quot;oct&quot;, k: k256, alg: &quot;&quot;}, &quot;aes-kw&quot;, extractable, [&quot;wrapKey&quot;, &quot;unwrapKey&quot;])');
</span><ins>+shouldReject('crypto.subtle.importKey(&quot;jwk&quot;, {kty: &quot;oct&quot;, k: k128, alg: &quot;A192CFB8&quot;}, &quot;aes-cfb-8&quot;, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;, &quot;wrapKey&quot;, &quot;unwrapKey&quot;])');
+shouldReject('crypto.subtle.importKey(&quot;jwk&quot;, {kty: &quot;oct&quot;, k: k192, alg: &quot;A256CFB8&quot;}, &quot;aes-cfb-8&quot;, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;, &quot;wrapKey&quot;, &quot;unwrapKey&quot;])');
+shouldReject('crypto.subtle.importKey(&quot;jwk&quot;, {kty: &quot;oct&quot;, k: k256, alg: &quot;A128CFB8&quot;}, &quot;aes-cfb-8&quot;, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;, &quot;wrapKey&quot;, &quot;unwrapKey&quot;])');
+shouldReject('crypto.subtle.importKey(&quot;jwk&quot;, {kty: &quot;oct&quot;, k: &quot;A72F&quot;, alg: &quot;foo&quot;}, &quot;aes-cbc&quot;, extractable, [&quot;wrapKey&quot;, &quot;unwrapKey&quot;])');
</ins><span class="cx"> // Jwk: wrong k format
</span><span class="cx"> shouldReject('crypto.subtle.importKey(&quot;jwk&quot;, {kty: &quot;oct&quot;, k: &quot;!!!&quot;, alg: &quot;foo&quot;}, &quot;aes-cbc&quot;, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;, &quot;wrapKey&quot;, &quot;unwrapKey&quot;])');
</span><span class="cx"> shouldReject('crypto.subtle.importKey(&quot;jwk&quot;, {kty: &quot;oct&quot;, k: &quot;&quot;, alg: &quot;foo&quot;}, &quot;aes-cbc&quot;, extractable, [&quot;encrypt&quot;, &quot;decrypt&quot;, &quot;wrapKey&quot;, &quot;unwrapKey&quot;])');
</span></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleaescfbimportkeydecryptexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-decrypt-expected.txt (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-decrypt-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-decrypt-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+[Worker] Test decrypting using AES-CFB with an imported 128bit key in workers
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Starting worker: resources/aes-cfb-import-key-decrypt.js
+PASS [Worker] bytesToASCIIString(plainText) is expectedPlainText
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleaescfbimportkeydecrypthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-decrypt.html (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-decrypt.html                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-decrypt.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+    &lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;script&gt;
+        worker = startWorker('resources/aes-cfb-import-key-decrypt.js');
+    &lt;/script&gt;
+    &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleaescfbimportkeyencryptexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-encrypt-expected.txt (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-encrypt-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-encrypt-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+[Worker] Test encrypting using AES-CFB with an imported 128bit key in workers
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Starting worker: resources/aes-cfb-import-key-encrypt.js
+PASS [Worker] bytesToHexString(cipherText) is expectedCipherText
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleaescfbimportkeyencrypthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-encrypt.html (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-encrypt.html                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-encrypt.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+    &lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;script&gt;
+        worker = startWorker('resources/aes-cfb-import-key-encrypt.js');
+    &lt;/script&gt;
+    &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleaescfbimportkeyunwrapkeyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-unwrap-key-expected.txt (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-unwrap-key-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-unwrap-key-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+[Worker] Test unwrapping a raw key with AES-CFB using an imported key in workers
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Starting worker: resources/aes-cfb-import-key-unwrap-key.js
+PASS [Worker] bytesToASCIIString(unwrappedKey) is expectedRawKey
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleaescfbimportkeyunwrapkeyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-unwrap-key.html (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-unwrap-key.html                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-unwrap-key.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+    &lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;script&gt;
+        worker = startWorker('resources/aes-cfb-import-key-unwrap-key.js');
+    &lt;/script&gt;
+    &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleaescfbimportkeywrapkeyexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-wrap-key-expected.txt (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-wrap-key-expected.txt                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-wrap-key-expected.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+[Worker] Test wrapping a raw key with AES-CFB using an imported key in workers
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Starting worker: resources/aes-cfb-import-key-wrap-key.js
+PASS [Worker] bytesToHexString(wrappedKey) is expectWrappedKey
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleaescfbimportkeywrapkeyhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-wrap-key.html (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-wrap-key.html                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/aes-cfb-import-key-wrap-key.html        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+    &lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;script&gt;
+        worker = startWorker('resources/aes-cfb-import-key-wrap-key.js');
+    &lt;/script&gt;
+    &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleresourcesaescfbimportkeydecryptjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/resources/aes-cfb-import-key-decrypt.js (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/resources/aes-cfb-import-key-decrypt.js                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/resources/aes-cfb-import-key-decrypt.js        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+importScripts('../../../../resources/js-test-pre.js');
+importScripts('../../../resources/common.js');
+
+description(&quot;Test decrypting using AES-CFB with an imported 128bit key in workers&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = false;
+var cipherText = hexStringToUint8Array(&quot;a572525a0baef88e6f5b198c6f&quot;);
+var aesCfbParams = {
+    name: &quot;aes-cfb-8&quot;,
+    iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;),
+}
+var rawKey = asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;);
+var expectedPlainText = &quot;Hello, World!&quot;;
+
+crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cfb-8&quot;, extractable, [&quot;decrypt&quot;]).then(function(key) {
+    return crypto.subtle.decrypt(aesCfbParams, key, cipherText);
+}).then(function(result) {
+    plainText = result;
+
+    shouldBe(&quot;bytesToASCIIString(plainText)&quot;, &quot;expectedPlainText&quot;);
+
+    finishJSTest();
+});
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleresourcesaescfbimportkeyencryptjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/resources/aes-cfb-import-key-encrypt.js (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/resources/aes-cfb-import-key-encrypt.js                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/resources/aes-cfb-import-key-encrypt.js        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+importScripts('../../../../resources/js-test-pre.js');
+importScripts('../../../resources/common.js');
+
+description(&quot;Test encrypting using AES-CFB with an imported 128bit key in workers&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = false;
+var plainText = asciiToUint8Array(&quot;Hello, World!&quot;);
+var aesCfbParams = {
+    name: &quot;aes-cfb-8&quot;,
+    iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;),
+}
+var rawKey = asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;);
+var expectedCipherText = &quot;a572525a0baef88e6f5b198c6f&quot;;
+
+crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cfb-8&quot;, extractable, [&quot;encrypt&quot;]).then(function(key) {
+    return crypto.subtle.encrypt(aesCfbParams, key, plainText);
+}).then(function(result) {
+    cipherText = result;
+
+    shouldBe(&quot;bytesToHexString(cipherText)&quot;, &quot;expectedCipherText&quot;);
+
+    finishJSTest();
+});
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleresourcesaescfbimportkeyunwrapkeyjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/resources/aes-cfb-import-key-unwrap-key.js (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/resources/aes-cfb-import-key-unwrap-key.js                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/resources/aes-cfb-import-key-unwrap-key.js        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+importScripts('../../../../resources/js-test-pre.js');
+importScripts('../../../resources/common.js');
+
+description(&quot;Test unwrapping a raw key with AES-CFB using an imported key in workers&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = true;
+var expectedRawKey = &quot;jnOw99oOZFLIEPMr&quot;;
+var rawKey = asciiToUint8Array(expectedRawKey);
+var aesCfbParams = {
+    name: &quot;aes-cfb-8&quot;,
+    iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;),
+}
+var wrappedKey = hexStringToUint8Array(&quot;8707ee311f6e8ed157885a7fc25f0ee7&quot;);
+
+
+crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cfb-8&quot;, extractable, [&quot;unwrapKey&quot;]).then(function(unwrappingKey) {
+    return crypto.subtle.unwrapKey(&quot;raw&quot;, wrappedKey, unwrappingKey, aesCfbParams, {name: &quot;aes-cbc&quot;}, extractable, [&quot;encrypt&quot;]);
+}).then(function(cryptoKey) {
+    return crypto.subtle.exportKey(&quot;raw&quot;, cryptoKey);
+}).then(function(result) {
+    unwrappedKey = result;
+
+    shouldBe(&quot;bytesToASCIIString(unwrappedKey)&quot;, &quot;expectedRawKey&quot;);
+
+    finishJSTest();
+});
</ins></span></pre></div>
<a id="trunkLayoutTestscryptoworkerssubtleresourcesaescfbimportkeywrapkeyjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/crypto/workers/subtle/resources/aes-cfb-import-key-wrap-key.js (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/crypto/workers/subtle/resources/aes-cfb-import-key-wrap-key.js                                (rev 0)
+++ trunk/LayoutTests/crypto/workers/subtle/resources/aes-cfb-import-key-wrap-key.js        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+importScripts('../../../../resources/js-test-pre.js');
+importScripts('../../../resources/common.js');
+
+description(&quot;Test wrapping a raw key with AES-CFB using an imported key in workers&quot;);
+
+jsTestIsAsync = true;
+
+var extractable = true;
+var rawKey = asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;);
+var aesCfbParams = {
+    name: &quot;aes-cfb-8&quot;,
+    iv: asciiToUint8Array(&quot;jnOw99oOZFLIEPMr&quot;),
+}
+var expectWrappedKey = &quot;8707ee311f6e8ed157885a7fc25f0ee7&quot;;
+
+crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cfb-8&quot;, extractable, [&quot;wrapKey&quot;]).then(function(result) {
+    wrappingKey = result;
+    return crypto.subtle.importKey(&quot;raw&quot;, rawKey, &quot;aes-cbc&quot;, extractable, [&quot;encrypt&quot;]);
+}).then(function(result) {
+    key = result;
+    return crypto.subtle.wrapKey(&quot;raw&quot;, key, wrappingKey, aesCfbParams);
+}).then(function(result) {
+    wrappedKey = result;
+
+    shouldBe(&quot;bytesToHexString(wrappedKey)&quot;, &quot;expectWrappedKey&quot;);
+
+    finishJSTest();
+});
</ins></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/Source/WebCore/CMakeLists.txt        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -331,7 +331,7 @@
</span><span class="cx">     crypto/SubtleCrypto.idl
</span><span class="cx">     crypto/WebKitSubtleCrypto.idl
</span><span class="cx"> 
</span><del>-    crypto/parameters/AesCbcParams.idl
</del><ins>+    crypto/parameters/AesCbcCfbParams.idl
</ins><span class="cx">     crypto/parameters/AesKeyGenParams.idl
</span><span class="cx">     crypto/parameters/HmacKeyParams.idl
</span><span class="cx">     crypto/parameters/RsaHashedImportParams.idl
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/Source/WebCore/ChangeLog        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -1,3 +1,88 @@
</span><ins>+2017-02-21  Jiewen Tan  &lt;jiewen_tan@apple.com&gt;
+
+        [WebCrypto] Add support for AES-CFB
+        https://bugs.webkit.org/show_bug.cgi?id=168344
+        &lt;rdar://problem/20940221&gt;
+
+        Reviewed by Brent Fulgham.
+
+        This patch adds support for AES-CFB. Operations of AES-CFB include: encrypt, decrypt, generateKey,
+        importKey, exportKey, wrapKey, and unwrapKey. This implementation follows a slightly old version
+        of WebCryptoAPI spec: https://www.w3.org/TR/2014/CR-WebCryptoAPI-20141211/#aes-cfb.
+
+        Tests: crypto/subtle/aes-cbc-cfb-decrypt-malformed-parameters.html
+               crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters.html
+               crypto/subtle/aes-cbc-import-key-unwrap-jwk-rsa-key-public.html
+               crypto/subtle/aes-cfb-generate-export-key-jwk-length-128.html
+               crypto/subtle/aes-cfb-generate-export-key-jwk-length-192.html
+               crypto/subtle/aes-cfb-generate-export-key-jwk-length-256.html
+               crypto/subtle/aes-cfb-generate-export-raw-key.html
+               crypto/subtle/aes-cfb-generate-key-encrypt-decrypt.html
+               crypto/subtle/aes-cfb-generate-key.html
+               crypto/subtle/aes-cfb-import-jwk-key-length-128.html
+               crypto/subtle/aes-cfb-import-jwk-key-length-192.html
+               crypto/subtle/aes-cfb-import-jwk-key-length-256.html
+               crypto/subtle/aes-cfb-import-key-decrypt.html
+               crypto/subtle/aes-cfb-import-key-encrypt.html
+               crypto/subtle/aes-cfb-import-key-unwrap-jwk-key.html
+               crypto/subtle/aes-cfb-import-key-unwrap-raw-key.html
+               crypto/subtle/aes-cfb-import-key-wrap-jwk-key.html
+               crypto/subtle/aes-cfb-import-key-wrap-raw-key.html
+               crypto/subtle/aes-cfb-import-raw-key.html
+               crypto/workers/subtle/aes-cfb-import-key-decrypt.html
+               crypto/workers/subtle/aes-cfb-import-key-encrypt.html
+               crypto/workers/subtle/aes-cfb-import-key-unwrap-key.html
+               crypto/workers/subtle/aes-cfb-import-key-wrap-key.html
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * PlatformGTK.cmake:
+        * PlatformMac.cmake:
+        * WebCore.xcodeproj/project.pbxproj:
+        Add CryptoAlgorithmAES_CFB.cpp,
+        change AesCbcParams.idl to AesCbcCfbParams.idl.
+        * bindings/js/JSSubtleCryptoCustom.cpp:
+        (WebCore::normalizeCryptoAlgorithmParameters):
+        Add support for AES-CFB.
+        * crypto/CryptoAlgorithm.h:
+        Include &lt;wtf/Variant.h&gt;.
+        * crypto/CryptoAlgorithmParameters.h:
+        Add support for AES-CFB.
+        * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
+        (WebCore::CryptoAlgorithmAES_CBC::encrypt):
+        (WebCore::CryptoAlgorithmAES_CBC::decrypt):
+        Rename CryptoAlgorithmAesCbcParams to CryptoAlgorithmAesCbcCfbParams.
+        * crypto/algorithms/CryptoAlgorithmAES_CFB.cpp: Added.
+        (WebCore::usagesAreInvalidForCryptoAlgorithmAES_CFB):
+        (WebCore::CryptoAlgorithmAES_CFB::create):
+        (WebCore::CryptoAlgorithmAES_CFB::identifier):
+        (WebCore::CryptoAlgorithmAES_CFB::encrypt):
+        (WebCore::CryptoAlgorithmAES_CFB::decrypt):
+        (WebCore::CryptoAlgorithmAES_CFB::generateKey):
+        (WebCore::CryptoAlgorithmAES_CFB::importKey):
+        (WebCore::CryptoAlgorithmAES_CFB::exportKey):
+        * crypto/algorithms/CryptoAlgorithmAES_CFB.h: Added.
+        * crypto/gnutls/CryptoAlgorithmAES_CFBGnuTLS.cpp: Added.
+        (WebCore::CryptoAlgorithmAES_CFB::platformEncrypt):
+        (WebCore::CryptoAlgorithmAES_CFB::platformDecrypt):
+        Add dummy support of AES_CFB for GTK+.
+        * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
+        (WebCore::transformAES_CBC):
+        Drop conditional PLATFORM(COCOA).
+        (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
+        (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
+        Rename CryptoAlgorithmAesCbcParams to CryptoAlgorithmAesCbcCfbParams.
+        * crypto/mac/CryptoAlgorithmAES_CFBMac.cpp: Added.
+        (WebCore::transformAES_CFB):
+        (WebCore::CryptoAlgorithmAES_CFB::platformEncrypt):
+        (WebCore::CryptoAlgorithmAES_CFB::platformDecrypt):
+        * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
+        (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
+        Add support for AES-CFB.
+        * crypto/parameters/AesCbcCfbParams.idl: Renamed from Source/WebCore/crypto/parameters/AesCbcParams.idl.
+        * crypto/parameters/CryptoAlgorithmAesCbcCfbParams.h: Renamed from Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcParams.h.
+        Since dictionaries AesCbcParams and AesCfbParams are essentially the same, I combine them together in our implementations.
+
</ins><span class="cx"> 2017-02-21  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, fix the ToT iOS build
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/Source/WebCore/DerivedSources.make        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -265,7 +265,7 @@
</span><span class="cx">     $(WebCore)/crypto/RsaOtherPrimesInfo.idl \
</span><span class="cx">     $(WebCore)/crypto/SubtleCrypto.idl \
</span><span class="cx">     $(WebCore)/crypto/WebKitSubtleCrypto.idl \
</span><del>-    $(WebCore)/crypto/parameters/AesCbcParams.idl \
</del><ins>+    $(WebCore)/crypto/parameters/AesCbcCfbParams.idl \
</ins><span class="cx">     $(WebCore)/crypto/parameters/AesKeyGenParams.idl \
</span><span class="cx">     $(WebCore)/crypto/parameters/HmacKeyParams.idl \
</span><span class="cx">     $(WebCore)/crypto/parameters/RsaHashedImportParams.idl \
</span></span></pre></div>
<a id="trunkSourceWebCorePlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/PlatformGTK.cmake (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/PlatformGTK.cmake        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/Source/WebCore/PlatformGTK.cmake        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -383,6 +383,7 @@
</span><span class="cx">         crypto/WebKitSubtleCrypto.cpp
</span><span class="cx"> 
</span><span class="cx">         crypto/algorithms/CryptoAlgorithmAES_CBC.cpp
</span><ins>+        crypto/algorithms/CryptoAlgorithmAES_CFB.cpp
</ins><span class="cx">         crypto/algorithms/CryptoAlgorithmAES_KW.cpp
</span><span class="cx">         crypto/algorithms/CryptoAlgorithmHMAC.cpp
</span><span class="cx">         crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp
</span><span class="lines">@@ -397,6 +398,7 @@
</span><span class="cx">         crypto/gcrypt/CryptoAlgorithmHMACGCrypt.cpp
</span><span class="cx"> 
</span><span class="cx">         crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp
</span><ins>+        crypto/gnutls/CryptoAlgorithmAES_CFBGnuTLS.cpp
</ins><span class="cx">         crypto/gnutls/CryptoAlgorithmAES_KWGnuTLS.cpp
</span><span class="cx">         crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp
</span><span class="cx">         crypto/gnutls/CryptoAlgorithmRSASSA_PKCS1_v1_5GnuTLS.cpp
</span></span></pre></div>
<a id="trunkSourceWebCorePlatformMaccmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/PlatformMac.cmake (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/PlatformMac.cmake        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/Source/WebCore/PlatformMac.cmake        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -179,6 +179,7 @@
</span><span class="cx">     crypto/WebKitSubtleCrypto.cpp
</span><span class="cx"> 
</span><span class="cx">     crypto/algorithms/CryptoAlgorithmAES_CBC.cpp
</span><ins>+    crypto/algorithms/CryptoAlgorithmAES_CFB.cpp
</ins><span class="cx">     crypto/algorithms/CryptoAlgorithmAES_KW.cpp
</span><span class="cx">     crypto/algorithms/CryptoAlgorithmHMAC.cpp
</span><span class="cx">     crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -2326,6 +2326,10 @@
</span><span class="cx">                 5597F8271D91C3130066BC21 /* ImageFrameCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 5597F8251D91C3130066BC21 /* ImageFrameCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 55A336F71D8209F40022C4C7 /* NativeImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 55A336F61D8209F40022C4C7 /* NativeImage.h */; };
</span><span class="cx">                 55A336F91D821E3C0022C4C7 /* ImageBackingStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 55A336F81D821E3C0022C4C7 /* ImageBackingStore.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                570440531E5278B200356601 /* CryptoAlgorithmAES_CFB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5712526A1E52527C008FF369 /* CryptoAlgorithmAES_CFB.cpp */; };
+                570440581E53851600356601 /* CryptoAlgorithmAES_CFBMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 570440571E53851600356601 /* CryptoAlgorithmAES_CFBMac.cpp */; };
+                5704405A1E53936200356601 /* JSAesCbcCfbParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 570440591E53936200356601 /* JSAesCbcCfbParams.h */; };
+                5704405C1E53937900356601 /* JSAesCbcCfbParams.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5704405B1E53937900356601 /* JSAesCbcCfbParams.cpp */; };
</ins><span class="cx">                 5706A6961DDE5C9500A03B14 /* CryptoAlgorithmRsaOaepParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 5706A6951DDE5C9500A03B14 /* CryptoAlgorithmRsaOaepParams.h */; };
</span><span class="cx">                 5706A6981DDE5E4600A03B14 /* JSRsaOaepParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 5706A6971DDE5E4600A03B14 /* JSRsaOaepParams.h */; };
</span><span class="cx">                 5706A69A1DDE5E8500A03B14 /* JSRsaOaepParams.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5706A6991DDE5E8500A03B14 /* JSRsaOaepParams.cpp */; };
</span><span class="lines">@@ -2334,11 +2338,10 @@
</span><span class="cx">                 5709E8CF1D413D9A003244AC /* WebKitSubtleCrypto.h in Headers */ = {isa = PBXBuildFile; fileRef = 5709E8CB1D413CE3003244AC /* WebKitSubtleCrypto.h */; };
</span><span class="cx">                 570A99DA1D417408004EC630 /* JSWebKitSubtleCrypto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1FF8F62180745D800132674 /* JSWebKitSubtleCrypto.cpp */; };
</span><span class="cx">                 570A99DB1D41A2F3004EC630 /* JSWebKitSubtleCrypto.h in Headers */ = {isa = PBXBuildFile; fileRef = E1FF8F63180745D800132674 /* JSWebKitSubtleCrypto.h */; };
</span><ins>+                571252691E524EB1008FF369 /* CryptoAlgorithmAES_CFB.h in Headers */ = {isa = PBXBuildFile; fileRef = 571252681E524EB1008FF369 /* CryptoAlgorithmAES_CFB.h */; };
</ins><span class="cx">                 571F21891DA57C54005C9EFD /* JSSubtleCrypto.h in Headers */ = {isa = PBXBuildFile; fileRef = 571F21881DA57C54005C9EFD /* JSSubtleCrypto.h */; };
</span><span class="cx">                 571F218B1DA57C7B005C9EFD /* JSSubtleCrypto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 571F218A1DA57C7A005C9EFD /* JSSubtleCrypto.cpp */; };
</span><del>-                572093D31DDCEB9A00310AB0 /* CryptoAlgorithmAesCbcParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 572093D21DDCEB9A00310AB0 /* CryptoAlgorithmAesCbcParams.h */; };
-                572093D51DDCED8E00310AB0 /* JSAesCbcParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 572093D41DDCED8E00310AB0 /* JSAesCbcParams.h */; };
-                572093D71DDCEDA700310AB0 /* JSAesCbcParams.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 572093D61DDCEDA700310AB0 /* JSAesCbcParams.cpp */; };
</del><ins>+                572093D31DDCEB9A00310AB0 /* CryptoAlgorithmAesCbcCfbParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 572093D21DDCEB9A00310AB0 /* CryptoAlgorithmAesCbcCfbParams.h */; };
</ins><span class="cx">                 572A7F211C6E5719009C6149 /* SimulatedClick.h in Headers */ = {isa = PBXBuildFile; fileRef = 572A7F201C6E5719009C6149 /* SimulatedClick.h */; };
</span><span class="cx">                 572A7F231C6E5A66009C6149 /* SimulatedClick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 572A7F221C6E5A66009C6149 /* SimulatedClick.cpp */; };
</span><span class="cx">                 573489391DAC6B6E00DC0667 /* CryptoAlgorithmParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 573489381DAC6B6D00DC0667 /* CryptoAlgorithmParameters.h */; };
</span><span class="lines">@@ -9684,6 +9687,9 @@
</span><span class="cx">                 55A336F61D8209F40022C4C7 /* NativeImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeImage.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 55A336F81D821E3C0022C4C7 /* ImageBackingStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageBackingStore.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 55D408F71A7C631800C78450 /* SVGImageClients.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageClients.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                570440571E53851600356601 /* CryptoAlgorithmAES_CFBMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CryptoAlgorithmAES_CFBMac.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                570440591E53936200356601 /* JSAesCbcCfbParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAesCbcCfbParams.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5704405B1E53937900356601 /* JSAesCbcCfbParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAesCbcCfbParams.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 5706A6941DDE5BF800A03B14 /* RsaOaepParams.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = RsaOaepParams.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5706A6951DDE5C9500A03B14 /* CryptoAlgorithmRsaOaepParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoAlgorithmRsaOaepParams.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5706A6971DDE5E4600A03B14 /* JSRsaOaepParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRsaOaepParams.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -9691,12 +9697,12 @@
</span><span class="cx">                 5709E8CA1D413CE3003244AC /* WebKitSubtleCrypto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitSubtleCrypto.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5709E8CB1D413CE3003244AC /* WebKitSubtleCrypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitSubtleCrypto.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5709E8CC1D413CE3003244AC /* WebKitSubtleCrypto.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebKitSubtleCrypto.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                571252681E524EB1008FF369 /* CryptoAlgorithmAES_CFB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoAlgorithmAES_CFB.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5712526A1E52527C008FF369 /* CryptoAlgorithmAES_CFB.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CryptoAlgorithmAES_CFB.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 571F21881DA57C54005C9EFD /* JSSubtleCrypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSubtleCrypto.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 571F218A1DA57C7A005C9EFD /* JSSubtleCrypto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSubtleCrypto.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                572093D11DDCEA4B00310AB0 /* AesCbcParams.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = AesCbcParams.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
-                572093D21DDCEB9A00310AB0 /* CryptoAlgorithmAesCbcParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoAlgorithmAesCbcParams.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                572093D41DDCED8E00310AB0 /* JSAesCbcParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAesCbcParams.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                572093D61DDCEDA700310AB0 /* JSAesCbcParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAesCbcParams.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                572093D11DDCEA4B00310AB0 /* AesCbcCfbParams.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = AesCbcCfbParams.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                572093D21DDCEB9A00310AB0 /* CryptoAlgorithmAesCbcCfbParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoAlgorithmAesCbcCfbParams.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 572A7F201C6E5719009C6149 /* SimulatedClick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimulatedClick.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 572A7F221C6E5A66009C6149 /* SimulatedClick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SimulatedClick.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 573489381DAC6B6D00DC0667 /* CryptoAlgorithmParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoAlgorithmParameters.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -23380,6 +23386,7 @@
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 E125F843182425C900D84CD9 /* CryptoAlgorithmAES_CBCMac.cpp */,
</span><ins>+                                570440571E53851600356601 /* CryptoAlgorithmAES_CFBMac.cpp */,
</ins><span class="cx">                                 E1FE137C184D270200892F13 /* CryptoAlgorithmAES_KWMac.cpp */,
</span><span class="cx">                                 E125F8371822F1EB00D84CD9 /* CryptoAlgorithmHMACMac.cpp */,
</span><span class="cx">                                 E1BB84AC1822CA7400525043 /* CryptoAlgorithmRegistryMac.cpp */,
</span><span class="lines">@@ -23398,6 +23405,8 @@
</span><span class="cx">                         children = (
</span><span class="cx">                                 E125F83F1824253A00D84CD9 /* CryptoAlgorithmAES_CBC.cpp */,
</span><span class="cx">                                 E125F8401824253A00D84CD9 /* CryptoAlgorithmAES_CBC.h */,
</span><ins>+                                5712526A1E52527C008FF369 /* CryptoAlgorithmAES_CFB.cpp */,
+                                571252681E524EB1008FF369 /* CryptoAlgorithmAES_CFB.h */,
</ins><span class="cx">                                 E1FE1378184D21BB00892F13 /* CryptoAlgorithmAES_KW.cpp */,
</span><span class="cx">                                 E1FE1379184D21BB00892F13 /* CryptoAlgorithmAES_KW.h */,
</span><span class="cx">                                 E125F82F1822F11B00D84CD9 /* CryptoAlgorithmHMAC.cpp */,
</span><span class="lines">@@ -23444,9 +23453,9 @@
</span><span class="cx">                 E1C657141816015F00256CDD /* parameters */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                572093D11DDCEA4B00310AB0 /* AesCbcParams.idl */,
</del><ins>+                                572093D11DDCEA4B00310AB0 /* AesCbcCfbParams.idl */,
</ins><span class="cx">                                 577483101DADC49900716EF9 /* AesKeyGenParams.idl */,
</span><del>-                                572093D21DDCEB9A00310AB0 /* CryptoAlgorithmAesCbcParams.h */,
</del><ins>+                                572093D21DDCEB9A00310AB0 /* CryptoAlgorithmAesCbcCfbParams.h */,
</ins><span class="cx">                                 E125F8391824104800D84CD9 /* CryptoAlgorithmAesCbcParamsDeprecated.h */,
</span><span class="cx">                                 577483111DADC55D00716EF9 /* CryptoAlgorithmAesKeyGenParams.h */,
</span><span class="cx">                                 E19AC3F61824E5D100349426 /* CryptoAlgorithmAesKeyGenParamsDeprecated.h */,
</span><span class="lines">@@ -23621,8 +23630,8 @@
</span><span class="cx">                 E1FF8F61180745C600132674 /* Crypto */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                572093D61DDCEDA700310AB0 /* JSAesCbcParams.cpp */,
-                                572093D41DDCED8E00310AB0 /* JSAesCbcParams.h */,
</del><ins>+                                5704405B1E53937900356601 /* JSAesCbcCfbParams.cpp */,
+                                570440591E53936200356601 /* JSAesCbcCfbParams.h */,
</ins><span class="cx">                                 577483151DAEC32200716EF9 /* JSAesKeyGenParams.cpp */,
</span><span class="cx">                                 577483131DAEC2EA00716EF9 /* JSAesKeyGenParams.h */,
</span><span class="cx">                                 5739E1301DAC7FD100E14383 /* JSCryptoAlgorithmParameters.cpp */,
</span><span class="lines">@@ -25425,6 +25434,7 @@
</span><span class="cx">                                 7C77C3D11DEE472400A50BFA /* BlobPropertyBag.h in Headers */,
</span><span class="cx">                                 2EDEF1F5121B0EFC00726DB2 /* BlobRegistry.h in Headers */,
</span><span class="cx">                                 2EDEF1F7121B0EFC00726DB2 /* BlobRegistryImpl.h in Headers */,
</span><ins>+                                5704405A1E53936200356601 /* JSAesCbcCfbParams.h in Headers */,
</ins><span class="cx">                                 2EB4BCD3121F03E300EC4885 /* BlobResourceHandle.h in Headers */,
</span><span class="cx">                                 976D6C7F122B8A3D001FD1F7 /* BlobURL.h in Headers */,
</span><span class="cx">                                 BC5EB5E10E81BE8700B25965 /* BorderData.h in Headers */,
</span><span class="lines">@@ -25617,7 +25627,7 @@
</span><span class="cx">                                 E172AF6E180F24C600FBADB9 /* CryptoAlgorithm.h in Headers */,
</span><span class="cx">                                 E125F8421824253A00D84CD9 /* CryptoAlgorithmAES_CBC.h in Headers */,
</span><span class="cx">                                 E1FE137B184D21BB00892F13 /* CryptoAlgorithmAES_KW.h in Headers */,
</span><del>-                                572093D31DDCEB9A00310AB0 /* CryptoAlgorithmAesCbcParams.h in Headers */,
</del><ins>+                                572093D31DDCEB9A00310AB0 /* CryptoAlgorithmAesCbcCfbParams.h in Headers */,
</ins><span class="cx">                                 E125F83A1824104800D84CD9 /* CryptoAlgorithmAesCbcParamsDeprecated.h in Headers */,
</span><span class="cx">                                 577483121DADC55D00716EF9 /* CryptoAlgorithmAesKeyGenParams.h in Headers */,
</span><span class="cx">                                 E19AC3F71824E5D100349426 /* CryptoAlgorithmAesKeyGenParamsDeprecated.h in Headers */,
</span><span class="lines">@@ -26468,7 +26478,6 @@
</span><span class="cx">                                 44EFF6431A6FF92700D45EEC /* IOTypesSPI.h in Headers */,
</span><span class="cx">                                 07AC47021952102100EE9723 /* ISOVTTCue.h in Headers */,
</span><span class="cx">                                 418F88050FF957AF0080F045 /* JSAbstractWorker.h in Headers */,
</span><del>-                                572093D51DDCED8E00310AB0 /* JSAesCbcParams.h in Headers */,
</del><span class="cx">                                 577483141DAEC2EB00716EF9 /* JSAesKeyGenParams.h in Headers */,
</span><span class="cx">                                 FDA15ECA12B03F50003A583A /* JSAnalyserNode.h in Headers */,
</span><span class="cx">                                 12A253E31C8FFF6600C22295 /* JSAnimatable.h in Headers */,
</span><span class="lines">@@ -27846,6 +27855,7 @@
</span><span class="cx">                                 083DAEA90F01A7FB00342754 /* RenderTextControlSingleLine.h in Headers */,
</span><span class="cx">                                 BCEA488E097D93020094C9E4 /* RenderTextFragment.h in Headers */,
</span><span class="cx">                                 E4C91A16180999F100A17F6D /* RenderTextLineBoxes.h in Headers */,
</span><ins>+                                571252691E524EB1008FF369 /* CryptoAlgorithmAES_CFB.h in Headers */,
</ins><span class="cx">                                 BCEA488A097D93020094C9E4 /* RenderTheme.h in Headers */,
</span><span class="cx">                                 1A299FE81D7F5FA600A60093 /* RenderThemeCocoa.h in Headers */,
</span><span class="cx">                                 FED13D520CEA949700D89466 /* RenderThemeIOS.h in Headers */,
</span><span class="lines">@@ -29228,6 +29238,7 @@
</span><span class="cx">                         isa = PBXSourcesBuildPhase;
</span><span class="cx">                         buildActionMask = 2147483647;
</span><span class="cx">                         files = (
</span><ins>+                                570440531E5278B200356601 /* CryptoAlgorithmAES_CFB.cpp in Sources */,
</ins><span class="cx">                                 41E1B1D00FF5986900576B3B /* AbstractWorker.cpp in Sources */,
</span><span class="cx">                                 37F57AB91A50726900876F98 /* AccessibilityARIAGrid.cpp in Sources */,
</span><span class="cx">                                 37F57ABA1A50726F00876F98 /* AccessibilityARIAGridCell.cpp in Sources */,
</span><span class="lines">@@ -29942,6 +29953,7 @@
</span><span class="cx">                                 D000EBA211BDAFD400C47726 /* FrameLoaderStateMachine.cpp in Sources */,
</span><span class="cx">                                 86BA766E166427A8005BE5D1 /* FrameLoadRequest.cpp in Sources */,
</span><span class="cx">                                 93309E0D099E64920056E581 /* FrameSelection.cpp in Sources */,
</span><ins>+                                570440581E53851600356601 /* CryptoAlgorithmAES_CFBMac.cpp in Sources */,
</ins><span class="cx">                                 4A8C96EB0BE69032004EEFF0 /* FrameSelectionMac.mm in Sources */,
</span><span class="cx">                                 C4CD629A18383766007EBAF1 /* FrameSnapshotting.cpp in Sources */,
</span><span class="cx">                                 65A21484097A3F5300B9050A /* FrameTree.cpp in Sources */,
</span><span class="lines">@@ -30264,7 +30276,6 @@
</span><span class="cx">                                 AD9FF6E11908391D003B61E0 /* IOSurfacePoolCocoa.mm in Sources */,
</span><span class="cx">                                 07AC47011952102100EE9723 /* ISOVTTCue.cpp in Sources */,
</span><span class="cx">                                 418F88040FF957AE0080F045 /* JSAbstractWorker.cpp in Sources */,
</span><del>-                                572093D71DDCEDA700310AB0 /* JSAesCbcParams.cpp in Sources */,
</del><span class="cx">                                 577483161DAEC32300716EF9 /* JSAesKeyGenParams.cpp in Sources */,
</span><span class="cx">                                 FDA15EC912B03F50003A583A /* JSAnalyserNode.cpp in Sources */,
</span><span class="cx">                                 31A795C61888BADC00382F90 /* JSANGLEInstancedArrays.cpp in Sources */,
</span><span class="lines">@@ -31338,6 +31349,7 @@
</span><span class="cx">                                 1A8A646C1D19FF8700D0E00F /* PaymentCocoa.mm in Sources */,
</span><span class="cx">                                 1A8A646D1D19FF8700D0E00F /* PaymentContactCocoa.mm in Sources */,
</span><span class="cx">                                 1A58E86D1D19E42D00C0EA73 /* PaymentCoordinator.cpp in Sources */,
</span><ins>+                                5704405C1E53937900356601 /* JSAesCbcCfbParams.cpp in Sources */,
</ins><span class="cx">                                 1ADA4A1C1D22F2C0005A9A15 /* PaymentMerchantSessionCocoa.mm in Sources */,
</span><span class="cx">                                 1A8A646E1D19FF8700D0E00F /* PaymentMethodCocoa.mm in Sources */,
</span><span class="cx">                                 1A58E8671D19D80E00C0EA73 /* PaymentRequest.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSSubtleCryptoCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;CryptoAlgorithm.h&quot;
</span><span class="cx"> #include &quot;CryptoAlgorithmRegistry.h&quot;
</span><del>-#include &quot;JSAesCbcParams.h&quot;
</del><ins>+#include &quot;JSAesCbcCfbParams.h&quot;
</ins><span class="cx"> #include &quot;JSAesKeyGenParams.h&quot;
</span><span class="cx"> #include &quot;JSCryptoAlgorithmParameters.h&quot;
</span><span class="cx"> #include &quot;JSCryptoKey.h&quot;
</span><span class="lines">@@ -113,10 +113,11 @@
</span><span class="cx">                 result = std::make_unique&lt;CryptoAlgorithmRsaOaepParams&gt;(params);
</span><span class="cx">                 break;
</span><span class="cx">             }
</span><del>-            case CryptoAlgorithmIdentifier::AES_CBC: {
-                auto params = convertDictionary&lt;CryptoAlgorithmAesCbcParams&gt;(state, value);
</del><ins>+            case CryptoAlgorithmIdentifier::AES_CBC:
+            case CryptoAlgorithmIdentifier::AES_CFB: {
+                auto params = convertDictionary&lt;CryptoAlgorithmAesCbcCfbParams&gt;(state, value);
</ins><span class="cx">                 RETURN_IF_EXCEPTION(scope, nullptr);
</span><del>-                result = std::make_unique&lt;CryptoAlgorithmAesCbcParams&gt;(params);
</del><ins>+                result = std::make_unique&lt;CryptoAlgorithmAesCbcCfbParams&gt;(params);
</ins><span class="cx">                 break;
</span><span class="cx">             }
</span><span class="cx">             default:
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoCryptoAlgorithmh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/CryptoAlgorithm.h (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/CryptoAlgorithm.h        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/Source/WebCore/crypto/CryptoAlgorithm.h        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include &quot;JsonWebKey.h&quot;
</span><span class="cx"> #include &quot;SubtleCrypto.h&quot;
</span><span class="cx"> #include &lt;wtf/Function.h&gt;
</span><ins>+#include &lt;wtf/Variant.h&gt;
</ins><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="cx"> #include &lt;wtf/WorkQueue.h&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoCryptoAlgorithmParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> public:
</span><span class="cx">     enum class Class {
</span><span class="cx">         None,
</span><del>-        AesCbcParams,
</del><ins>+        AesCbcCfbParams,
</ins><span class="cx">         AesKeyGenParams,
</span><span class="cx">         HmacKeyParams,
</span><span class="cx">         RsaHashedKeyGenParams,
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmAES_CBCcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.cpp (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.cpp        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.cpp        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SUBTLE_CRYPTO)
</span><span class="cx"> 
</span><del>-#include &quot;CryptoAlgorithmAesCbcParams.h&quot;
</del><ins>+#include &quot;CryptoAlgorithmAesCbcCfbParams.h&quot;
</ins><span class="cx"> #include &quot;CryptoAlgorithmAesCbcParamsDeprecated.h&quot;
</span><span class="cx"> #include &quot;CryptoAlgorithmAesKeyGenParams.h&quot;
</span><span class="cx"> #include &quot;CryptoAlgorithmAesKeyGenParamsDeprecated.h&quot;
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx"> void CryptoAlgorithmAES_CBC::encrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, Ref&lt;CryptoKey&gt;&amp;&amp; key, Vector&lt;uint8_t&gt;&amp;&amp; plainText, VectorCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback, ScriptExecutionContext&amp; context, WorkQueue&amp; workQueue)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(parameters);
</span><del>-    auto&amp; aesParameters = downcast&lt;CryptoAlgorithmAesCbcParams&gt;(*parameters);
</del><ins>+    auto&amp; aesParameters = downcast&lt;CryptoAlgorithmAesCbcCfbParams&gt;(*parameters);
</ins><span class="cx">     if (aesParameters.ivVector().size() != IVSIZE) {
</span><span class="cx">         exceptionCallback(OperationError);
</span><span class="cx">         return;
</span><span class="lines">@@ -80,7 +80,7 @@
</span><span class="cx"> void CryptoAlgorithmAES_CBC::decrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, Ref&lt;CryptoKey&gt;&amp;&amp; key, Vector&lt;uint8_t&gt;&amp;&amp; cipherText, VectorCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback, ScriptExecutionContext&amp; context, WorkQueue&amp; workQueue)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(parameters);
</span><del>-    auto&amp; aesParameters = downcast&lt;CryptoAlgorithmAesCbcParams&gt;(*parameters);
</del><ins>+    auto&amp; aesParameters = downcast&lt;CryptoAlgorithmAesCbcCfbParams&gt;(*parameters);
</ins><span class="cx">     if (aesParameters.ivVector().size() != IVSIZE) {
</span><span class="cx">         exceptionCallback(OperationError);
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmAES_CFBcppfromrev212735trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmAES_CBCcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CFB.cpp (from rev 212735, trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.cpp) (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CFB.cpp                                (rev 0)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CFB.cpp        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,180 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;CryptoAlgorithmAES_CFB.h&quot;
+
+#if ENABLE(SUBTLE_CRYPTO)
+
+#include &quot;CryptoAlgorithmAesCbcCfbParams.h&quot;
+#include &quot;CryptoAlgorithmAesKeyGenParams.h&quot;
+#include &quot;CryptoKeyAES.h&quot;
+#include &quot;ExceptionCode.h&quot;
+
+namespace WebCore {
+
+static const char* const ALG128 = &quot;A128CFB8&quot;;
+static const char* const ALG192 = &quot;A192CFB8&quot;;
+static const char* const ALG256 = &quot;A256CFB8&quot;;
+static const size_t IVSIZE = 16;
+
+static inline bool usagesAreInvalidForCryptoAlgorithmAES_CFB(CryptoKeyUsageBitmap usages)
+{
+    return usages &amp; (CryptoKeyUsageSign | CryptoKeyUsageVerify | CryptoKeyUsageDeriveKey | CryptoKeyUsageDeriveBits);
+}
+
+Ref&lt;CryptoAlgorithm&gt; CryptoAlgorithmAES_CFB::create()
+{
+    return adoptRef(*new CryptoAlgorithmAES_CFB);
+}
+
+CryptoAlgorithmIdentifier CryptoAlgorithmAES_CFB::identifier() const
+{
+    return s_identifier;
+}
+
+void CryptoAlgorithmAES_CFB::encrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, Ref&lt;CryptoKey&gt;&amp;&amp; key, Vector&lt;uint8_t&gt;&amp;&amp; plainText, VectorCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback, ScriptExecutionContext&amp; context, WorkQueue&amp; workQueue)
+{
+    ASSERT(parameters);
+    auto&amp; aesParameters = downcast&lt;CryptoAlgorithmAesCbcCfbParams&gt;(*parameters);
+    if (aesParameters.ivVector().size() != IVSIZE) {
+        exceptionCallback(OperationError);
+        return;
+    }
+    platformEncrypt(WTFMove(parameters), WTFMove(key), WTFMove(plainText), WTFMove(callback), WTFMove(exceptionCallback), context, workQueue);
+}
+
+void CryptoAlgorithmAES_CFB::decrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, Ref&lt;CryptoKey&gt;&amp;&amp; key, Vector&lt;uint8_t&gt;&amp;&amp; cipherText, VectorCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback, ScriptExecutionContext&amp; context, WorkQueue&amp; workQueue)
+{
+    ASSERT(parameters);
+    auto&amp; aesParameters = downcast&lt;CryptoAlgorithmAesCbcCfbParams&gt;(*parameters);
+    if (aesParameters.ivVector().size() != IVSIZE) {
+        exceptionCallback(OperationError);
+        return;
+    }
+    platformDecrypt(WTFMove(parameters), WTFMove(key), WTFMove(cipherText), WTFMove(callback), WTFMove(exceptionCallback), context, workQueue);
+}
+
+void CryptoAlgorithmAES_CFB::generateKey(const CryptoAlgorithmParameters&amp; parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyOrKeyPairCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback, ScriptExecutionContext&amp;)
+{
+    const auto&amp; aesParameters = downcast&lt;CryptoAlgorithmAesKeyGenParams&gt;(parameters);
+
+    if (usagesAreInvalidForCryptoAlgorithmAES_CFB(usages)) {
+        exceptionCallback(SYNTAX_ERR);
+        return;
+    }
+
+    auto result = CryptoKeyAES::generate(CryptoAlgorithmIdentifier::AES_CFB, aesParameters.length, extractable, usages);
+    if (!result) {
+        exceptionCallback(OperationError);
+        return;
+    }
+
+    callback(WTFMove(result));
+}
+
+void CryptoAlgorithmAES_CFB::importKey(SubtleCrypto::KeyFormat format, KeyData&amp;&amp; data, const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, bool extractable, CryptoKeyUsageBitmap usages, KeyCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback)
+{
+    ASSERT(parameters);
+    if (usagesAreInvalidForCryptoAlgorithmAES_CFB(usages)) {
+        exceptionCallback(SYNTAX_ERR);
+        return;
+    }
+
+    RefPtr&lt;CryptoKeyAES&gt; result;
+    switch (format) {
+    case SubtleCrypto::KeyFormat::Raw:
+        result = CryptoKeyAES::importRaw(parameters-&gt;identifier, WTFMove(WTF::get&lt;Vector&lt;uint8_t&gt;&gt;(data)), extractable, usages);
+        break;
+    case SubtleCrypto::KeyFormat::Jwk: {
+        auto checkAlgCallback = [](size_t length, const String&amp; alg) -&gt; bool {
+            switch (length) {
+            case CryptoKeyAES::s_length128:
+                return alg.isNull() || alg == ALG128;
+            case CryptoKeyAES::s_length192:
+                return alg.isNull() || alg == ALG192;
+            case CryptoKeyAES::s_length256:
+                return alg.isNull() || alg == ALG256;
+            }
+            return false;
+        };
+        result = CryptoKeyAES::importJwk(parameters-&gt;identifier, WTFMove(WTF::get&lt;JsonWebKey&gt;(data)), extractable, usages, WTFMove(checkAlgCallback));
+        break;
+    }
+    default:
+        exceptionCallback(NOT_SUPPORTED_ERR);
+        return;
+    }
+    if (!result) {
+        exceptionCallback(DataError);
+        return;
+    }
+
+    callback(*result);
+}
+
+void CryptoAlgorithmAES_CFB::exportKey(SubtleCrypto::KeyFormat format, Ref&lt;CryptoKey&gt;&amp;&amp; key, KeyDataCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback)
+{
+    const auto&amp; aesKey = downcast&lt;CryptoKeyAES&gt;(key.get());
+
+    if (aesKey.key().isEmpty()) {
+        exceptionCallback(OperationError);
+        return;
+    }
+
+    KeyData result;
+    switch (format) {
+    case SubtleCrypto::KeyFormat::Raw:
+        result = Vector&lt;uint8_t&gt;(aesKey.key());
+        break;
+    case SubtleCrypto::KeyFormat::Jwk: {
+        JsonWebKey jwk = aesKey.exportJwk();
+        switch (aesKey.key().size() * 8) {
+        case CryptoKeyAES::s_length128:
+            jwk.alg = String(ALG128);
+            break;
+        case CryptoKeyAES::s_length192:
+            jwk.alg = String(ALG192);
+            break;
+        case CryptoKeyAES::s_length256:
+            jwk.alg = String(ALG256);
+            break;
+        default:
+            ASSERT_NOT_REACHED();
+        }
+        result = WTFMove(jwk);
+        break;
+    }
+    default:
+        exceptionCallback(NOT_SUPPORTED_ERR);
+        return;
+    }
+
+    callback(format, WTFMove(result));
+}
+
+}
+
+#endif // ENABLE(SUBTLE_CRYPTO)
</ins></span></pre></div>
<a id="trunkSourceWebCorecryptoalgorithmsCryptoAlgorithmAES_CFBh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CFB.h (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CFB.h                                (rev 0)
+++ trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CFB.h        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;CryptoAlgorithm.h&quot;
+
+#if ENABLE(SUBTLE_CRYPTO)
+
+namespace WebCore {
+
+class CryptoKeyAES;
+
+class CryptoAlgorithmAES_CFB final : public CryptoAlgorithm {
+public:
+    static constexpr const char* s_name = &quot;AES-CFB-8&quot;;
+    static constexpr CryptoAlgorithmIdentifier s_identifier = CryptoAlgorithmIdentifier::AES_CFB;
+    static Ref&lt;CryptoAlgorithm&gt; create();
+
+private:
+    CryptoAlgorithmAES_CFB() = default;
+    CryptoAlgorithmIdentifier identifier() const final;
+
+    void encrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, Ref&lt;CryptoKey&gt;&amp;&amp;, Vector&lt;uint8_t&gt;&amp;&amp;, VectorCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;, WorkQueue&amp;) final;
+    void decrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, Ref&lt;CryptoKey&gt;&amp;&amp;, Vector&lt;uint8_t&gt;&amp;&amp;, VectorCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;, WorkQueue&amp;) final;
+    void generateKey(const CryptoAlgorithmParameters&amp;, bool extractable, CryptoKeyUsageBitmap, KeyOrKeyPairCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;) final;
+    void importKey(SubtleCrypto::KeyFormat, KeyData&amp;&amp;, const std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, bool extractable, CryptoKeyUsageBitmap, KeyCallback&amp;&amp;, ExceptionCallback&amp;&amp;) final;
+    void exportKey(SubtleCrypto::KeyFormat, Ref&lt;CryptoKey&gt;&amp;&amp;, KeyDataCallback&amp;&amp;, ExceptionCallback&amp;&amp;) final;
+
+    void platformEncrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, Ref&lt;CryptoKey&gt;&amp;&amp;, Vector&lt;uint8_t&gt;&amp;&amp;, VectorCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;, WorkQueue&amp;);
+    void platformDecrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, Ref&lt;CryptoKey&gt;&amp;&amp;, Vector&lt;uint8_t&gt;&amp;&amp;, VectorCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;, WorkQueue&amp;);
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(SUBTLE_CRYPTO)
</ins></span></pre></div>
<a id="trunkSourceWebCorecryptognutlsCryptoAlgorithmAES_CFBGnuTLScppfromrev212735trunkSourceWebCorecryptoparametersCryptoAlgorithmAesCbcParamsh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_CFBGnuTLS.cpp (from rev 212735, trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcParams.h) (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_CFBGnuTLS.cpp                                (rev 0)
+++ trunk/Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_CFBGnuTLS.cpp        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;CryptoAlgorithmAES_CFB.h&quot;
+
+#if ENABLE(SUBTLE_CRYPTO)
+
+#include &quot;ExceptionCode.h&quot;
+#include &quot;NotImplemented.h&quot;
+
+namespace WebCore {
+
+void CryptoAlgorithmAES_CFB::platformEncrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, Ref&lt;CryptoKey&gt;&amp;&amp;, Vector&lt;uint8_t&gt;&amp;&amp;, VectorCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;, WorkQueue&amp;)
+{
+    notImplemented();
+}
+
+void CryptoAlgorithmAES_CFB::platformDecrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp;, Ref&lt;CryptoKey&gt;&amp;&amp;, Vector&lt;uint8_t&gt;&amp;&amp;, VectorCallback&amp;&amp;, ExceptionCallback&amp;&amp;, ScriptExecutionContext&amp;, WorkQueue&amp;)
+{
+    notImplemented();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(SUBTLE_CRYPTO)
</ins></span></pre></div>
<a id="trunkSourceWebCorecryptomacCryptoAlgorithmAES_CBCMaccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SUBTLE_CRYPTO)
</span><span class="cx"> 
</span><del>-#include &quot;CryptoAlgorithmAesCbcParams.h&quot;
</del><ins>+#include &quot;CryptoAlgorithmAesCbcCfbParams.h&quot;
</ins><span class="cx"> #include &quot;CryptoAlgorithmAesCbcParamsDeprecated.h&quot;
</span><span class="cx"> #include &quot;CryptoKeyAES.h&quot;
</span><span class="cx"> #include &quot;ExceptionCode.h&quot;
</span><span class="lines">@@ -41,14 +41,8 @@
</span><span class="cx"> // https://bugs.webkit.org/show_bug.cgi?id=164939
</span><span class="cx"> static ExceptionOr&lt;Vector&lt;uint8_t&gt;&gt; transformAES_CBC(CCOperation operation, const uint8_t* iv, const Vector&lt;uint8_t&gt;&amp; key, const uint8_t* data, size_t dataLength)
</span><span class="cx"> {
</span><del>-    size_t keyLengthInBytes = key.size();
</del><span class="cx">     CCCryptorRef cryptor;
</span><del>-#if PLATFORM(COCOA)
-    CCAlgorithm aesAlgorithm = kCCAlgorithmAES;
-#else
-    CCAlgorithm aesAlgorithm = kCCAlgorithmAES128;
-#endif
-    CCCryptorStatus status = CCCryptorCreate(operation, aesAlgorithm, kCCOptionPKCS7Padding, key.data(), keyLengthInBytes, iv, &amp;cryptor);
</del><ins>+    CCCryptorStatus status = CCCryptorCreate(operation, kCCAlgorithmAES, kCCOptionPKCS7Padding, key.data(), key.size(), iv, &amp;cryptor);
</ins><span class="cx">     if (status)
</span><span class="cx">         return Exception { OperationError };
</span><span class="cx"> 
</span><span class="lines">@@ -77,7 +71,7 @@
</span><span class="cx"> {
</span><span class="cx">     context.ref();
</span><span class="cx">     workQueue.dispatch([parameters = WTFMove(parameters), key = WTFMove(key), plainText = WTFMove(plainText), callback = WTFMove(callback), exceptionCallback = WTFMove(exceptionCallback), &amp;context]() mutable {
</span><del>-        auto&amp; aesParameters = downcast&lt;CryptoAlgorithmAesCbcParams&gt;(*parameters);
</del><ins>+        auto&amp; aesParameters = downcast&lt;CryptoAlgorithmAesCbcCfbParams&gt;(*parameters);
</ins><span class="cx">         auto&amp; aesKey = downcast&lt;CryptoKeyAES&gt;(key.get());
</span><span class="cx">         ASSERT(aesParameters.ivVector().size() == kCCBlockSizeAES128);
</span><span class="cx">         auto result = transformAES_CBC(kCCEncrypt, aesParameters.ivVector().data(), aesKey.key(), plainText.data(), plainText.size());
</span><span class="lines">@@ -101,7 +95,7 @@
</span><span class="cx"> {
</span><span class="cx">     context.ref();
</span><span class="cx">     workQueue.dispatch([parameters = WTFMove(parameters), key = WTFMove(key), cipherText = WTFMove(cipherText), callback = WTFMove(callback), exceptionCallback = WTFMove(exceptionCallback), &amp;context]() mutable {
</span><del>-        auto&amp; aesParameters = downcast&lt;CryptoAlgorithmAesCbcParams&gt;(*parameters);
</del><ins>+        auto&amp; aesParameters = downcast&lt;CryptoAlgorithmAesCbcCfbParams&gt;(*parameters);
</ins><span class="cx">         auto&amp; aesKey = downcast&lt;CryptoKeyAES&gt;(key.get());
</span><span class="cx">         assert(aesParameters.ivVector().size() == kCCBlockSizeAES128);
</span><span class="cx">         auto result = transformAES_CBC(kCCDecrypt, aesParameters.ivVector().data(), aesKey.key(), cipherText.data(), cipherText.size());
</span></span></pre></div>
<a id="trunkSourceWebCorecryptomacCryptoAlgorithmAES_CFBMaccppfromrev212735trunkSourceWebCorecryptomacCryptoAlgorithmAES_CBCMaccpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_CFBMac.cpp (from rev 212735, trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp) (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_CFBMac.cpp                                (rev 0)
+++ trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_CFBMac.cpp        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,117 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;CryptoAlgorithmAES_CFB.h&quot;
+
+#if ENABLE(SUBTLE_CRYPTO)
+
+#include &quot;CryptoAlgorithmAesCbcCfbParams.h&quot;
+#include &quot;CryptoKeyAES.h&quot;
+#include &quot;ExceptionCode.h&quot;
+#include &quot;ScriptExecutionContext.h&quot;
+#include &lt;CommonCrypto/CommonCrypto.h&gt;
+
+namespace WebCore {
+
+static ExceptionOr&lt;Vector&lt;uint8_t&gt;&gt; transformAES_CFB(CCOperation operation, const Vector&lt;uint8_t&gt;&amp; iv, const Vector&lt;uint8_t&gt;&amp; key, const Vector&lt;uint8_t&gt;&amp; data)
+{
+    CCCryptorRef cryptor;
+    CCCryptorStatus status = CCCryptorCreateWithMode(operation, kCCModeCFB8, kCCAlgorithmAES, ccNoPadding, iv.data(), key.data(), key.size(), 0, 0, 0, 0, &amp;cryptor);
+    if (status)
+        return Exception { OperationError };
+
+    Vector&lt;uint8_t&gt; result(CCCryptorGetOutputLength(cryptor, data.size(), true));
+
+    size_t bytesWritten;
+    status = CCCryptorUpdate(cryptor, data.data(), data.size(), result.data(), result.size(), &amp;bytesWritten);
+    if (status)
+        return Exception { OperationError };
+
+    uint8_t* p = result.data() + bytesWritten;
+    status = CCCryptorFinal(cryptor, p, result.end() - p, &amp;bytesWritten);
+    p += bytesWritten;
+    if (status)
+        return Exception { OperationError };
+
+    ASSERT(p &lt;= result.end());
+    result.shrink(p - result.begin());
+
+    CCCryptorRelease(cryptor);
+
+    return WTFMove(result);
+}
+
+void CryptoAlgorithmAES_CFB::platformEncrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, Ref&lt;CryptoKey&gt;&amp;&amp; key, Vector&lt;uint8_t&gt;&amp;&amp; plainText, VectorCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback, ScriptExecutionContext&amp; context, WorkQueue&amp; workQueue)
+{
+    context.ref();
+    workQueue.dispatch([parameters = WTFMove(parameters), key = WTFMove(key), plainText = WTFMove(plainText), callback = WTFMove(callback), exceptionCallback = WTFMove(exceptionCallback), &amp;context]() mutable {
+        auto&amp; aesParameters = downcast&lt;CryptoAlgorithmAesCbcCfbParams&gt;(*parameters);
+        auto&amp; aesKey = downcast&lt;CryptoKeyAES&gt;(key.get());
+        ASSERT(aesParameters.ivVector().size() == kCCBlockSizeAES128);
+        auto result = transformAES_CFB(kCCEncrypt, aesParameters.ivVector(), aesKey.key(), plainText);
+        if (result.hasException()) {
+            // We should only dereference callbacks after being back to the Document/Worker threads.
+            context.postTask([exceptionCallback = WTFMove(exceptionCallback), ec = result.releaseException().code(), callback = WTFMove(callback)](ScriptExecutionContext&amp; context) {
+                exceptionCallback(ec);
+                context.deref();
+            });
+            return;
+        }
+        // We should only dereference callbacks after being back to the Document/Worker threads.
+        context.postTask([callback = WTFMove(callback), result = result.releaseReturnValue(), exceptionCallback = WTFMove(exceptionCallback)](ScriptExecutionContext&amp; context) {
+            callback(result);
+            context.deref();
+        });
+    });
+}
+
+void CryptoAlgorithmAES_CFB::platformDecrypt(std::unique_ptr&lt;CryptoAlgorithmParameters&gt;&amp;&amp; parameters, Ref&lt;CryptoKey&gt;&amp;&amp; key, Vector&lt;uint8_t&gt;&amp;&amp; cipherText, VectorCallback&amp;&amp; callback, ExceptionCallback&amp;&amp; exceptionCallback, ScriptExecutionContext&amp; context, WorkQueue&amp; workQueue)
+{
+    context.ref();
+    workQueue.dispatch([parameters = WTFMove(parameters), key = WTFMove(key), cipherText = WTFMove(cipherText), callback = WTFMove(callback), exceptionCallback = WTFMove(exceptionCallback), &amp;context]() mutable {
+        auto&amp; aesParameters = downcast&lt;CryptoAlgorithmAesCbcCfbParams&gt;(*parameters);
+        auto&amp; aesKey = downcast&lt;CryptoKeyAES&gt;(key.get());
+        assert(aesParameters.ivVector().size() == kCCBlockSizeAES128);
+        auto result = transformAES_CFB(kCCDecrypt, aesParameters.ivVector(), aesKey.key(), cipherText);
+        if (result.hasException()) {
+            // We should only dereference callbacks after being back to the Document/Worker threads.
+            context.postTask([exceptionCallback = WTFMove(exceptionCallback), ec = result.releaseException().code(), callback = WTFMove(callback)](ScriptExecutionContext&amp; context) {
+                exceptionCallback(ec);
+                context.deref();
+            });
+            return;
+        }
+        // We should only dereference callbacks after being back to the Document/Worker threads.
+        context.postTask([callback = WTFMove(callback), result = result.releaseReturnValue(), exceptionCallback = WTFMove(exceptionCallback)](ScriptExecutionContext&amp; context) {
+            callback(result);
+            context.deref();
+        });
+    });
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(SUBTLE_CRYPTO)
</ins></span></pre></div>
<a id="trunkSourceWebCorecryptomacCryptoAlgorithmRegistryMaccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRegistryMac.cpp (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRegistryMac.cpp        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/Source/WebCore/crypto/mac/CryptoAlgorithmRegistryMac.cpp        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #if ENABLE(SUBTLE_CRYPTO)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;CryptoAlgorithmAES_CBC.h&quot;
</span><ins>+#include &quot;CryptoAlgorithmAES_CFB.h&quot;
</ins><span class="cx"> #include &quot;CryptoAlgorithmAES_KW.h&quot;
</span><span class="cx"> #include &quot;CryptoAlgorithmHMAC.h&quot;
</span><span class="cx"> #include &quot;CryptoAlgorithmRSAES_PKCS1_v1_5.h&quot;
</span><span class="lines">@@ -45,6 +46,7 @@
</span><span class="cx"> void CryptoAlgorithmRegistry::platformRegisterAlgorithms()
</span><span class="cx"> {
</span><span class="cx">     registerAlgorithm&lt;CryptoAlgorithmAES_CBC&gt;();
</span><ins>+    registerAlgorithm&lt;CryptoAlgorithmAES_CFB&gt;();
</ins><span class="cx">     registerAlgorithm&lt;CryptoAlgorithmAES_KW&gt;();
</span><span class="cx">     registerAlgorithm&lt;CryptoAlgorithmHMAC&gt;();
</span><span class="cx">     registerAlgorithm&lt;CryptoAlgorithmRSAES_PKCS1_v1_5&gt;();
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoparametersAesCbcCfbParamsidlfromrev212735trunkSourceWebCorecryptoparametersAesCbcParamsidl"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/crypto/parameters/AesCbcCfbParams.idl (from rev 212735, trunk/Source/WebCore/crypto/parameters/AesCbcParams.idl) (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/parameters/AesCbcCfbParams.idl                                (rev 0)
+++ trunk/Source/WebCore/crypto/parameters/AesCbcCfbParams.idl        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// This is a unified dictionary for AesCbcParams and AesCfbParams.
+// https://www.w3.org/TR/WebCryptoAPI/#dfn-AesCbcParams, and
+// https://www.w3.org/TR/2014/CR-WebCryptoAPI-20141211/#dfn-AesCfbParams
+[
+    Conditional=SUBTLE_CRYPTO,
+    ImplementedAs=CryptoAlgorithmAesCbcCfbParams
+] dictionary AesCbcCfbParams : CryptoAlgorithmParameters {
+    // The initialization vector. MUST be 16 bytes.
+    required BufferSource iv;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCorecryptoparametersAesCbcParamsidl"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/crypto/parameters/AesCbcParams.idl (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/parameters/AesCbcParams.idl        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/Source/WebCore/crypto/parameters/AesCbcParams.idl        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -1,32 +0,0 @@
</span><del>-/*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-[
-    Conditional=SUBTLE_CRYPTO,
-    ImplementedAs=CryptoAlgorithmAesCbcParams
-] dictionary AesCbcParams : CryptoAlgorithmParameters {
-    // The initialization vector. MUST be 16 bytes.
-    required BufferSource iv;
-};
</del></span></pre></div>
<a id="trunkSourceWebCorecryptoparametersCryptoAlgorithmAesCbcCfbParamshfromrev212735trunkSourceWebCorecryptoparametersCryptoAlgorithmAesCbcParamsh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcCfbParams.h (from rev 212735, trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcParams.h) (0 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcCfbParams.h                                (rev 0)
+++ trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcCfbParams.h        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;BufferSource.h&quot;
+#include &quot;CryptoAlgorithmParameters.h&quot;
+#include &lt;wtf/Vector.h&gt;
+
+#if ENABLE(SUBTLE_CRYPTO)
+
+namespace WebCore {
+
+class CryptoAlgorithmAesCbcCfbParams final : public CryptoAlgorithmParameters {
+public:
+    BufferSource iv;
+
+    Class parametersClass() const final { return Class::AesCbcCfbParams; }
+
+    const Vector&lt;uint8_t&gt;&amp; ivVector()
+    {
+        if (!m_ivVector.isEmpty() || !iv.length())
+            return m_ivVector;
+
+        m_ivVector.append(iv.data(), iv.length());
+        return m_ivVector;
+    }
+
+private:
+    Vector&lt;uint8_t&gt; m_ivVector;
+};
+
+} // namespace WebCore
+
+SPECIALIZE_TYPE_TRAITS_CRYPTO_ALGORITHM_PARAMETERS(AesCbcCfbParams)
+
+#endif // ENABLE(SUBTLE_CRYPTO)
</ins></span></pre></div>
<a id="trunkSourceWebCorecryptoparametersCryptoAlgorithmAesCbcParamsh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcParams.h (212735 => 212736)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcParams.h        2017-02-21 20:00:52 UTC (rev 212735)
+++ trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcParams.h        2017-02-21 20:04:44 UTC (rev 212736)
</span><span class="lines">@@ -1,59 +0,0 @@
</span><del>-/*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include &quot;BufferSource.h&quot;
-#include &quot;CryptoAlgorithmParameters.h&quot;
-#include &lt;wtf/Vector.h&gt;
-
-#if ENABLE(SUBTLE_CRYPTO)
-
-namespace WebCore {
-
-class CryptoAlgorithmAesCbcParams final : public CryptoAlgorithmParameters {
-public:
-    BufferSource iv;
-
-    Class parametersClass() const final { return Class::AesCbcParams; }
-
-    const Vector&lt;uint8_t&gt;&amp; ivVector()
-    {
-        if (!m_ivVector.isEmpty() || !iv.length())
-            return m_ivVector;
-
-        m_ivVector.append(iv.data(), iv.length());
-        return m_ivVector;
-    }
-
-private:
-    Vector&lt;uint8_t&gt; m_ivVector;
-};
-
-} // namespace WebCore
-
-SPECIALIZE_TYPE_TRAITS_CRYPTO_ALGORITHM_PARAMETERS(AesCbcParams)
-
-#endif // ENABLE(SUBTLE_CRYPTO)
</del></span></pre>
</div>
</div>

</body>
</html>