Skip to content

Commit

Permalink
Merge pull request #66 from shamilovtim/patch-1
Browse files Browse the repository at this point in the history
fix: nullability checks in AesGcmProvider
  • Loading branch information
microshine authored Mar 28, 2024
2 parents 1ecf8be + 7b57920 commit c6c60ed
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/aes/gsm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ export abstract class AesGcmProvider extends AesProvider {
throw new OperationError("iv: Must have length more than 0 and less than 2^64 - 1");
}
// tagLength
if (!("tagLength" in algorithm)) {
algorithm.tagLength = 128;
}
algorithm.tagLength ??= 128;

switch (algorithm.tagLength) {
case 32:
case 64:
Expand Down

0 comments on commit c6c60ed

Please sign in to comment.