Selaa lähdekoodia

fix aes cfb decode packet. fix #739

Darien Raymond 8 vuotta sitten
vanhempi
commit
eef2a72ac0
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      proxy/shadowsocks/config.go

+ 1 - 1
proxy/shadowsocks/config.go

@@ -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