FILE / ScuroNeko/mtg

utils/stream_cipher.go

Исходный файл и его история в репозитории.
FILE 038b2b200db55d01e6eaf8e893b1a0e8445583b1
Files
mtg/utils/stream_cipher.go
T
2019-09-04 10:19:01 +03:00

12 lines
196 B
Go

package utils
import (
"crypto/aes"
"crypto/cipher"
)
func MakeStreamCipher(key, iv []byte) cipher.Stream {
block, _ := aes.NewCipher(key) // nolint: gosec
return cipher.NewCTR(block, iv)
}