Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Mar 12, 2024
1 parent 50126a1 commit 7b130ea
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export class RandomnessSingleton {
}
const result = Buffer.alloc(length);
for (let i = 0; i < length; i++) {
// Each byte of the buffer is set to a 1 byte of this.counter's value. 0xff is 255 in decimal and it's used as
// a mask to get the last 8 bits of the shifted counter.
result[i] = (this.counter >> (i * 8)) & 0xff;
}
this.counter++;
Expand Down

0 comments on commit 7b130ea

Please sign in to comment.