FILE / ScuroNeko/mtg

utils/stream_cipher.go

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