1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-01-17 14:57:44 -05:00

fix aes-256-cfb iv length

This commit is contained in:
Darien Raymond 2016-12-16 17:31:13 +01:00
parent 68164d46f9
commit dd96b4eee7
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -4,6 +4,7 @@ import (
"bytes" "bytes"
"crypto/cipher" "crypto/cipher"
"crypto/md5" "crypto/md5"
"v2ray.com/core/common/crypto" "v2ray.com/core/common/crypto"
"v2ray.com/core/common/errors" "v2ray.com/core/common/errors"
"v2ray.com/core/common/protocol" "v2ray.com/core/common/protocol"
@ -73,7 +74,7 @@ func (v *AesCfb) KeySize() int {
} }
func (v *AesCfb) IVSize() int { func (v *AesCfb) IVSize() int {
return 16 return v.KeyBytes
} }
func (v *AesCfb) NewEncodingStream(key []byte, iv []byte) (cipher.Stream, error) { func (v *AesCfb) NewEncodingStream(key []byte, iv []byte) (cipher.Stream, error) {