Skip to content

Commit

Permalink
fixed counter bound
Browse files Browse the repository at this point in the history
  • Loading branch information
CluEleSsUK authored and AnomalRoil committed Feb 8, 2023
1 parent 650981b commit 9057474
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/age/stream-cipher.ts
Expand Up @@ -14,7 +14,7 @@ const NONCE_SIZE = 12 // STREAM nonce size

// due to using a 32bit uint for the counter, this is the max
// value the counter can be without risking a nonce reuse
const COUNTER_MAX = Math.pow(2, 32)
const COUNTER_MAX = Math.pow(2, 32) - 1

type ui8a = Uint8Array

Expand Down

0 comments on commit 9057474

Please sign in to comment.