OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 <script src="../resources/common.js"></script> | 5 <script src="../resources/common.js"></script> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 <p id="description"></p> | 8 <p id="description"></p> |
9 <div id="console"></div> | 9 <div id="console"></div> |
10 | 10 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 { | 66 { |
67 algorithm: "SHA-1", | 67 algorithm: "SHA-1", |
68 input: "0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c", | 68 input: "0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c", |
69 salt: "", | 69 salt: "", |
70 info: "", | 70 info: "", |
71 length: 42, | 71 length: 42, |
72 output: "2c91117204d745f3500d636a62f64f0ab3bae548aa53d423b0d1f27ebba6f5e
5673a081d70cce7acfc48" | 72 output: "2c91117204d745f3500d636a62f64f0ab3bae548aa53d423b0d1f27ebba6f5e
5673a081d70cce7acfc48" |
73 }, | 73 }, |
74 ]; | 74 ]; |
75 | 75 |
76 var extractable = true; | 76 var extractable = false; |
77 function runTest(testCase) | 77 function runTest(testCase) |
78 { | 78 { |
79 return Promise.resolve(null).then(function() { | 79 return Promise.resolve(null).then(function() { |
80 return crypto.subtle.importKey("raw", hexStringToUint8Array(testCase.inp
ut), "HKDF", extractable, ['deriveKey','deriveBits']); | 80 return crypto.subtle.importKey("raw", hexStringToUint8Array(testCase.inp
ut), "HKDF", extractable, ['deriveKey','deriveBits']); |
81 }).then(function(result) { | 81 }).then(function(result) { |
82 key = result; | 82 key = result; |
83 | 83 |
84 shouldEvaluateAs("key.type", "secret"); | 84 shouldEvaluateAs("key.type", "secret"); |
85 shouldEvaluateAs("key.extractable", extractable); | 85 shouldEvaluateAs("key.extractable", extractable); |
86 shouldEvaluateAs("key.algorithm.name", "HKDF"); | 86 shouldEvaluateAs("key.algorithm.name", "HKDF"); |
(...skipping 11 matching lines...) Expand all Loading... |
98 kHkdfTestVectors.forEach(function(testCase) { | 98 kHkdfTestVectors.forEach(function(testCase) { |
99 lastPromise = lastPromise.then(runTest.bind(null, testCase)); | 99 lastPromise = lastPromise.then(runTest.bind(null, testCase)); |
100 }); | 100 }); |
101 | 101 |
102 lastPromise.then(finishJSTest, failAndFinishJSTest); | 102 lastPromise.then(finishJSTest, failAndFinishJSTest); |
103 | 103 |
104 </script> | 104 </script> |
105 | 105 |
106 </body> | 106 </body> |
107 </html> | 107 </html> |
OLD | NEW |