Skip to content

Commit

Permalink
aes: do not use ?.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Aug 4, 2024
1 parent b3454cd commit c82461e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/aes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,8 @@ function computeTag(
data: Uint8Array,
AAD?: Uint8Array
) {
const h = fn.create(key, data.length + (AAD?.length || 0));
const aadLength = AAD == null ? 0 : AAD.length;
const h = fn.create(key, data.length + aadLength);
if (AAD) h.update(AAD);
h.update(data);
const num = new Uint8Array(16);
Expand Down

0 comments on commit c82461e

Please sign in to comment.