Fix shadowsocks xchacha cipher nonce size

This commit is contained in:
yuhan6665 committed 2021-12-19 21:18:35 -05:00
1 parent 63da3a5481
commit 9ea1bf7c1d
3 files changed
+4 -8

No files matched your search

+1 -1
View File
@@ -86,7 +86,7 @@ func ReadTCPSession(validator *Validator, reader io.Reader) (*protocol.RequestHe
if aead != nil {
auth := &crypto.AEADAuthenticator{
AEAD: aead,
NonceGenerator: crypto.GenerateInitialAEADNonce(),
NonceGenerator: crypto.GenerateAEADNonceWithSize(aead.NonceSize()),
}
r = crypto.NewAuthenticationReader(auth, &crypto.AEADChunkSizeParser{
Auth: auth,