Small refactorings

This commit is contained in:
9seconds
2021-03-21 21:19:26 +03:00
parent 8de727932d
commit 4d2d21e101
4 changed files with 60 additions and 34 deletions
+23
View File
@@ -0,0 +1,23 @@
package obfuscated2
import (
"crypto/aes"
"crypto/cipher"
)
func makeAesCtr(key, iv []byte) cipher.Stream {
block, err := aes.NewCipher(key)
if err != nil {
panic(err)
}
return cipher.NewCTR(block, iv)
}
func invertByteSlices(dst, src []byte) {
lenDst := len(dst) - 1
for i, v := range src {
dst[lenDst-i] = v
}
}