1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 09:36:34 -05:00

fix aes cfb decode packet. fix #739

This commit is contained in:
Darien Raymond 2017-11-27 10:42:34 +01:00
parent fefb5c8e01
commit eef2a72ac0
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -142,7 +142,7 @@ func (v *AesCfb) EncodePacket(key []byte, b *buf.Buffer) error {
func (v *AesCfb) DecodePacket(key []byte, b *buf.Buffer) error {
iv := b.BytesTo(v.IVSize())
stream := crypto.NewAesEncryptionStream(key, iv)
stream := crypto.NewAesDecryptionStream(key, iv)
stream.XORKeyStream(b.BytesFrom(v.IVSize()), b.BytesFrom(v.IVSize()))
b.SliceFrom(v.IVSize())
return nil