You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
v2ray-core/common/crypto/aes.go

17 lines
358 B

package crypto
import (
"crypto/aes"
"crypto/cipher"
)
func NewAesDecryptionStream(key []byte, iv []byte) cipher.Stream {
aesBlock, _ := aes.NewCipher(key)
return cipher.NewCFBDecrypter(aesBlock, iv)
}
func NewAesEncryptionStream(key []byte, iv []byte) cipher.Stream {
aesBlock, _ := aes.NewCipher(key)
return cipher.NewCFBEncrypter(aesBlock, iv)
}