From dd96b4eee71a9c4755c9097e26641e37b483c858 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Fri, 16 Dec 2016 17:31:13 +0100 Subject: [PATCH] fix aes-256-cfb iv length --- proxy/shadowsocks/config.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proxy/shadowsocks/config.go b/proxy/shadowsocks/config.go index 48df6b1c0..7da5e0e39 100644 --- a/proxy/shadowsocks/config.go +++ b/proxy/shadowsocks/config.go @@ -4,6 +4,7 @@ import ( "bytes" "crypto/cipher" "crypto/md5" + "v2ray.com/core/common/crypto" "v2ray.com/core/common/errors" "v2ray.com/core/common/protocol" @@ -73,7 +74,7 @@ func (v *AesCfb) KeySize() int { } func (v *AesCfb) IVSize() int { - return 16 + return v.KeyBytes } func (v *AesCfb) NewEncodingStream(key []byte, iv []byte) (cipher.Stream, error) {