| <script src="../../resources/js-test-pre.js"></script> |
| <script src="../resources/common.js"></script> |
| description("Test encrypting using AES-CFB with an imported 128bit key"); |
| var plainText = asciiToUint8Array("Hello, World!"); |
| iv: asciiToUint8Array("jnOw99oOZFLIEPMr"), |
| var rawKey = asciiToUint8Array("jnOw99oOZFLIEPMr"); |
| var expectedCipherText = "a572525a0baef88e6f5b198c6f"; |
| crypto.subtle.importKey("raw", rawKey, "aes-cfb-8", extractable, ["encrypt"]).then(function(key) { |
| return crypto.subtle.encrypt(aesCfbParams, key, plainText); |
| }).then(function(result) { |
| shouldBe("bytesToHexString(cipherText)", "expectedCipherText"); |
| <script src="../../resources/js-test-post.js"></script> |