Fix shadowsocks xchacha cipher nonce size

This commit is contained in:
yuhan6665 2021-12-18 23:23:09 -05:00
parent 63da3a5481
commit 9ea1bf7c1d
3 changed files with 4 additions and 8 deletions

View file

@ -39,10 +39,6 @@ func GenerateIncreasingNonce(nonce []byte) BytesGenerator {
}
}
func GenerateInitialAEADNonce() BytesGenerator {
return GenerateIncreasingNonce([]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF})
}
func GenerateAEADNonceWithSize(nonceSize int) BytesGenerator {
c := make([]byte, nonceSize)
for i := 0; i < nonceSize; i++ {