Skip to content

Commit

Permalink
Fix forcetypeassert checks
Browse files Browse the repository at this point in the history
  • Loading branch information
aankur committed Oct 2, 2024
1 parent fdd62c0 commit cbe05b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ func xorBytesCTR(block cipher.Block, iv []byte, dst, src []byte) error {

xorBuf := xorBufferPool.Get()
defer xorBufferPool.Put(xorBuf)
buffer := xorBuf.([]byte)

ctr := xorBuf.([]byte)[:len(iv)]
ctr := buffer[:len(iv)]
copy(ctr, iv)
bs := block.BlockSize()
stream := xorBuf.([]byte)[len(iv) : len(iv)+bs]
stream := buffer[len(iv) : len(iv)+bs]

i := 0
for i < len(src) {
Expand Down

0 comments on commit cbe05b3

Please sign in to comment.