File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -380,8 +380,8 @@ type pub inline ChaCha {
380
380
381
381
while i < MATRIX_SIZE {
382
382
@tmp.set(i, to_u32(@tmp.get(i).wrapping_add(@matrix.get(i))))
383
- little.write_i32(@tmp.get(i), into: @buffer, at: i * 4 )
384
- i += 1
383
+ little.write_i32(@tmp.get(i), into: @buffer, at: i.wrapping_mul(4) )
384
+ i = i.wrapping_add(1)
385
385
}
386
386
387
387
# The chance of this overflowing is practically zero, but we use checked
@@ -398,7 +398,7 @@ type pub inline ChaCha {
398
398
let idx = offset.wrapping_add(i)
399
399
400
400
bytes.set(idx, bytes.get(idx) ^ @buffer.get(i))
401
- i += 1
401
+ i = i.wrapping_add(1)
402
402
}
403
403
404
404
return
@@ -410,7 +410,7 @@ type pub inline ChaCha {
410
410
let idx = offset.wrapping_add(i)
411
411
412
412
bytes.set(idx, bytes.get(idx) ^ @buffer.get(i))
413
- i += 1
413
+ i = i.wrapping_add(1)
414
414
}
415
415
416
416
len = len.wrapping_sub(BLOCK_SIZE)
You can’t perform that action at this time.
0 commit comments