FILE / ScuroNeko/mtg

utils/stream_cipher.go

Исходный файл и его история в репозитории.
FILE c68f2cd50f8f56453cc2d67cb8f5b99f4d462150
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)
}