@@ -145,7 +145,6 @@ func TestCTR_AES_multiblock_random_IV(t *testing.T) {
145145 const Size = 100
146146
147147 for _ , keySize := range []int {16 , 24 , 32 } {
148- keySize := keySize
149148 t .Run (fmt .Sprintf ("keySize=%d" , keySize ), func (t * testing.T ) {
150149 key := randBytes (t , r , keySize )
151150 aesBlock , err := aes .NewCipher (key )
@@ -164,10 +163,8 @@ func TestCTR_AES_multiblock_random_IV(t *testing.T) {
164163 // individually using multiblock implementation to catch edge cases.
165164
166165 for part1 := 0 ; part1 <= Size ; part1 ++ {
167- part1 := part1
168166 t .Run (fmt .Sprintf ("part1=%d" , part1 ), func (t * testing.T ) {
169167 for part2 := 0 ; part2 <= Size - part1 ; part2 ++ {
170- part2 := part2
171168 t .Run (fmt .Sprintf ("part2=%d" , part2 ), func (t * testing.T ) {
172169 _ , multiblockCtr := makeTestingCiphers (aesBlock , iv )
173170 multiblockCiphertext := make ([]byte , len (plaintext ))
@@ -216,7 +213,6 @@ func TestCTR_AES_multiblock_overflow_IV(t *testing.T) {
216213 }
217214
218215 for _ , keySize := range []int {16 , 24 , 32 } {
219- keySize := keySize
220216 t .Run (fmt .Sprintf ("keySize=%d" , keySize ), func (t * testing.T ) {
221217 for _ , iv := range ivs {
222218 key := randBytes (t , r , keySize )
@@ -227,7 +223,6 @@ func TestCTR_AES_multiblock_overflow_IV(t *testing.T) {
227223
228224 t .Run (fmt .Sprintf ("iv=%s" , hex .EncodeToString (iv )), func (t * testing.T ) {
229225 for _ , offset := range []int {0 , 1 , 16 , 1024 } {
230- offset := offset
231226 t .Run (fmt .Sprintf ("offset=%d" , offset ), func (t * testing.T ) {
232227 genericCtr , multiblockCtr := makeTestingCiphers (aesBlock , iv )
233228
@@ -260,7 +255,6 @@ func TestCTR_AES_multiblock_XORKeyStreamAt(t *testing.T) {
260255 plaintext := randBytes (t , r , Size )
261256
262257 for _ , keySize := range []int {16 , 24 , 32 } {
263- keySize := keySize
264258 t .Run (fmt .Sprintf ("keySize=%d" , keySize ), func (t * testing.T ) {
265259 key := randBytes (t , r , keySize )
266260 iv := randBytes (t , r , aesBlockSize )
0 commit comments