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
1 change: 1 addition & 0 deletions example/src/hooks/useTestsList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import '../tests/subtle/sign_verify';
import '../tests/subtle/supports';
import '../tests/subtle/getPublicKey';
import '../tests/subtle/usage_canonicalization';
import '../tests/subtle/validation_ordering';
import '../tests/subtle/wrap_unwrap';
import '../tests/utils/utils_tests';
import '../tests/utils/encoding_tests';
Expand Down
18 changes: 9 additions & 9 deletions example/src/tests/subtle/encrypt_decrypt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ async function testRSAEncryptionWrongKey({
return assertThrowsAsync(
async () =>
await subtle.encrypt(algorithm, privateKey as CryptoKey, plaintext),
'The requested operation is not valid for the provided key',
'InvalidAccessError',
);
}

Expand All @@ -301,7 +301,7 @@ async function testRSAEncryptionBadUsage({
return assertThrowsAsync(
async () =>
await subtle.encrypt(algorithm, publicKey as CryptoKey, plaintext),
'The requested operation is not valid',
'InvalidAccessError',
);
}

Expand All @@ -328,7 +328,7 @@ async function testRSADecryptionWrongKey({
return assertThrowsAsync(
async () =>
await subtle.decrypt(algorithm, publicKey as CryptoKey, ciphertext),
'The requested operation is not valid',
'InvalidAccessError',
);
}

Expand All @@ -355,7 +355,7 @@ async function testRSADecryptionBadUsage({
return assertThrowsAsync(
async () =>
await subtle.decrypt(algorithm, publicKey as CryptoKey, ciphertext),
'The requested operation is not valid',
'InvalidAccessError',
);
}

Expand Down Expand Up @@ -647,7 +647,7 @@ test(SUITE, 'ChaCha20-Poly1305 wrong key usage encrypt', async () => {
key as CryptoKey,
getRandomValues(new Uint8Array(32)),
),
'The requested operation is not valid for the provided key',
'InvalidAccessError',
);
});

Expand All @@ -674,7 +674,7 @@ test(SUITE, 'ChaCha20-Poly1305 wrong key usage decrypt', async () => {
key as CryptoKey,
ciphertext,
),
'The requested operation is not valid for the provided key',
'InvalidAccessError',
);
});

Expand Down Expand Up @@ -936,7 +936,7 @@ async function testAESEncryptNoEncrypt({

await assertThrowsAsync(
async () => await subtle.encrypt(algorithm, key, plaintext),
'The requested operation is not valid for the provided key',
'InvalidAccessError',
);
}

Expand All @@ -962,7 +962,7 @@ async function testAESEncryptNoDecrypt({

await assertThrowsAsync(
async () => await subtle.decrypt(algorithm, key, output),
'The requested operation is not valid for the provided key',
'InvalidAccessError',
);
}

Expand All @@ -982,7 +982,7 @@ async function testAESEncryptWrongAlg(

await assertThrowsAsync(
async () => await subtle.encrypt(algorithm, key, plaintext),
'The requested operation is not valid for the provided key',
'InvalidAccessError',
);
}

Expand Down
Loading
Loading