Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions WebCryptoAPI/digest/cshake.tentative.https.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Object.keys(digestedData).forEach(function (alg) {
Object.keys(sourceData).forEach(function (size) {
promise_test(function (test) {
return crypto.subtle
.digest({ name: alg, length: length }, sourceData[size])
.digest({ name: alg, outputLength: length }, sourceData[size])
.then(function (result) {
assert_true(
equalBuffers(result, digestedData[alg][length][size]),
Expand All @@ -183,7 +183,7 @@ Object.keys(digestedData).forEach(function (alg) {
buffer[0] = sourceData[size][0];
return alg;
},
length
outputLength: length
}, buffer)
.then(function (result) {
assert_true(
Expand All @@ -196,7 +196,7 @@ Object.keys(digestedData).forEach(function (alg) {
promise_test(function (test) {
var buffer = new Uint8Array(sourceData[size]);
var promise = crypto.subtle
.digest({ name: alg, length: length }, buffer)
.digest({ name: alg, outputLength: length }, buffer)
.then(function (result) {
assert_true(
equalBuffers(result, digestedData[alg][length][size]),
Expand All @@ -217,7 +217,7 @@ Object.keys(digestedData).forEach(function (alg) {
buffer.buffer.transfer();
return alg;
},
length
outputLength: length
}, buffer)
.then(function (result) {
assert_true(
Expand All @@ -230,7 +230,7 @@ Object.keys(digestedData).forEach(function (alg) {
promise_test(function (test) {
var buffer = new Uint8Array(sourceData[size]);
var promise = crypto.subtle
.digest({ name: alg, length: length }, buffer)
.digest({ name: alg, outputLength: length }, buffer)
.then(function (result) {
assert_true(
equalBuffers(result, digestedData[alg][length][size]),
Expand Down
36 changes: 18 additions & 18 deletions WebCryptoAPI/sign_verify/kmac.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function run_test() {
var promise = importVectorKeys(vector, ["verify", "sign"])
.then(function(vector) {
promise_test(function(test) {
var algorithmParams = {name: vector.algorithm, length: vector.length};
var algorithmParams = {name: vector.algorithm, outputLength: vector.outputLength};
if (vector.customization !== undefined) {
algorithmParams.customization = vector.customization;
}
Expand Down Expand Up @@ -48,7 +48,7 @@ function run_test() {
var signature = copyBuffer(vector.signature);
signature[0] = 255 - signature[0];
var algorithmParams = {
length: vector.length,
outputLength: vector.outputLength,
get name() {
signature[0] = vector.signature[0];
return vector.algorithm;
Expand Down Expand Up @@ -81,7 +81,7 @@ function run_test() {
.then(function(vector) {
promise_test(function(test) {
var signature = copyBuffer(vector.signature);
var algorithmParams = {name: vector.algorithm, length: vector.length};
var algorithmParams = {name: vector.algorithm, outputLength: vector.outputLength};
if (vector.customization !== undefined) {
algorithmParams.customization = vector.customization;
}
Expand Down Expand Up @@ -115,7 +115,7 @@ function run_test() {
signature.buffer.transfer();
return vector.algorithm;
},
length: vector.length
outputLength: vector.outputLength
};
if (vector.customization !== undefined) {
algorithmParams.customization = vector.customization;
Expand Down Expand Up @@ -144,7 +144,7 @@ function run_test() {
.then(function(vector) {
promise_test(function(test) {
var signature = copyBuffer(vector.signature);
var algorithmParams = {name: vector.algorithm, length: vector.length};
var algorithmParams = {name: vector.algorithm, outputLength: vector.outputLength};
if (vector.customization !== undefined) {
algorithmParams.customization = vector.customization;
}
Expand Down Expand Up @@ -175,7 +175,7 @@ function run_test() {
var plaintext = copyBuffer(vector.plaintext);
plaintext[0] = 255 - plaintext[0];
var algorithmParams = {
length: vector.length,
outputLength: vector.outputLength,
get name() {
plaintext[0] = vector.plaintext[0];
return vector.algorithm;
Expand Down Expand Up @@ -208,7 +208,7 @@ function run_test() {
.then(function(vector) {
promise_test(function(test) {
var plaintext = copyBuffer(vector.plaintext);
var algorithmParams = {name: vector.algorithm, length: vector.length};
var algorithmParams = {name: vector.algorithm, outputLength: vector.outputLength};
if (vector.customization !== undefined) {
algorithmParams.customization = vector.customization;
}
Expand Down Expand Up @@ -242,7 +242,7 @@ function run_test() {
plaintext.buffer.transfer();
return vector.algorithm;
},
length: vector.length
outputLength: vector.outputLength
};
if (vector.customization !== undefined) {
algorithmParams.customization = vector.customization;
Expand Down Expand Up @@ -271,7 +271,7 @@ function run_test() {
.then(function(vector) {
promise_test(function(test) {
var plaintext = copyBuffer(vector.plaintext);
var algorithmParams = {name: vector.algorithm, length: vector.length};
var algorithmParams = {name: vector.algorithm, outputLength: vector.outputLength};
if (vector.customization !== undefined) {
algorithmParams.customization = vector.customization;
}
Expand Down Expand Up @@ -301,7 +301,7 @@ function run_test() {
var promise = importVectorKeys(vector, ["sign"])
.then(function(vector) {
promise_test(function(test) {
var algorithmParams = {name: vector.algorithm, length: vector.length};
var algorithmParams = {name: vector.algorithm, outputLength: vector.outputLength};
if (vector.customization !== undefined) {
algorithmParams.customization = vector.customization;
}
Expand All @@ -326,7 +326,7 @@ function run_test() {
var promise = importVectorKeys(vector, ["verify", "sign"])
.then(function(vectors) {
promise_test(function(test) {
var algorithmParams = {name: vector.algorithm, length: vector.length};
var algorithmParams = {name: vector.algorithm, outputLength: vector.outputLength};
if (vector.customization !== undefined) {
algorithmParams.customization = vector.customization;
}
Expand Down Expand Up @@ -363,7 +363,7 @@ function run_test() {
return importVectorKeys(vector, ["verify", "sign"])
.then(function(vectors) {
promise_test(function(test) {
var algorithmParams = {name: vector.algorithm, length: vector.length};
var algorithmParams = {name: vector.algorithm, outputLength: vector.outputLength};
if (vector.customization !== undefined) {
algorithmParams.customization = vector.customization;
}
Expand Down Expand Up @@ -401,7 +401,7 @@ function run_test() {
return importVectorKeys(vector, ["verify", "sign"])
.then(function(vector) {
promise_test(function(test) {
var algorithmParams = {name: vector.algorithm, length: vector.length};
var algorithmParams = {name: vector.algorithm, outputLength: vector.outputLength};
if (vector.customization !== undefined) {
algorithmParams.customization = vector.customization;
}
Expand Down Expand Up @@ -438,7 +438,7 @@ function run_test() {
var plaintext = copyBuffer(vector.plaintext);
plaintext[0] = 255 - plaintext[0];
promise_test(function(test) {
var algorithmParams = {name: vector.algorithm, length: vector.length};
var algorithmParams = {name: vector.algorithm, outputLength: vector.outputLength};
if (vector.customization !== undefined) {
algorithmParams.customization = vector.customization;
}
Expand Down Expand Up @@ -470,7 +470,7 @@ function run_test() {
var signature = copyBuffer(vector.signature);
signature[0] = 255 - signature[0];
promise_test(function(test) {
var algorithmParams = {name: vector.algorithm, length: vector.length};
var algorithmParams = {name: vector.algorithm, outputLength: vector.outputLength};
if (vector.customization !== undefined) {
algorithmParams.customization = vector.customization;
}
Expand Down Expand Up @@ -501,7 +501,7 @@ function run_test() {
.then(function(vector) {
var signature = vector.signature.slice(1); // Drop first byte
promise_test(function(test) {
var algorithmParams = {name: vector.algorithm, length: vector.length};
var algorithmParams = {name: vector.algorithm, outputLength: vector.outputLength};
if (vector.customization !== undefined) {
algorithmParams.customization = vector.customization;
}
Expand Down Expand Up @@ -531,8 +531,8 @@ function run_test() {
var promise = importVectorKeys(vector, ["verify", "sign"])
.then(function(vector) {
promise_test(function(test) {
var differentLength = vector.length === 256 ? 512 : 256;
var algorithmParams = {name: vector.algorithm, length: differentLength};
var differentLength = vector.outputLength === 256 ? 512 : 256;
var algorithmParams = {name: vector.algorithm, outputLength: differentLength};
if (vector.customization !== undefined) {
algorithmParams.customization = vector.customization;
}
Expand Down
12 changes: 6 additions & 6 deletions WebCryptoAPI/sign_verify/kmac_vectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function getTestVectors() {
// Sample #1 - KMAC128, no customization
name: "KMAC128 with no customization",
algorithm: "KMAC128",
length: 256,
outputLength: 256,
keyBuffer: new Uint8Array([
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b,
0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
Expand All @@ -25,7 +25,7 @@ function getTestVectors() {
// Sample #2 - KMAC128, with customization
name: "KMAC128 with customization",
algorithm: "KMAC128",
length: 256,
outputLength: 256,
keyBuffer: new Uint8Array([
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b,
0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
Expand All @@ -47,7 +47,7 @@ function getTestVectors() {
// Sample #3 - KMAC128, large data, with customization
name: "KMAC128 with large data and customization",
algorithm: "KMAC128",
length: 256,
outputLength: 256,
keyBuffer: new Uint8Array([
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b,
0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
Expand All @@ -69,7 +69,7 @@ function getTestVectors() {
// Sample #4 - KMAC256, with customization, 512-bit output
name: "KMAC256 with customization and 512-bit output",
algorithm: "KMAC256",
length: 512,
outputLength: 512,
keyBuffer: new Uint8Array([
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b,
0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
Expand All @@ -94,7 +94,7 @@ function getTestVectors() {
// Sample #5 - KMAC256, large data, no customization, 512-bit output
name: "KMAC256 with large data and no customization",
algorithm: "KMAC256",
length: 512,
outputLength: 512,
keyBuffer: new Uint8Array([
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b,
0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
Expand All @@ -116,7 +116,7 @@ function getTestVectors() {
// Sample #6 - KMAC256, large data, with customization, 512-bit output
name: "KMAC256 with large data and customization",
algorithm: "KMAC256",
length: 512,
outputLength: 512,
keyBuffer: new Uint8Array([
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b,
0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
Expand Down
Loading