mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-13 03:49:35 +03:00
VMess AEAD based packet length
(cherry picked from commit 08221600082a79376bdc262f2ffec1a3129ae98d)
This commit is contained in:
@ -7,6 +7,8 @@ import (
|
||||
|
||||
"github.com/xtls/xray-core/common"
|
||||
|
||||
"github.com/xtls/xray-core/common/crypto"
|
||||
|
||||
"golang.org/x/crypto/sha3"
|
||||
)
|
||||
|
||||
@ -116,3 +118,11 @@ func (s *ShakeSizeParser) NextPaddingLen() uint16 {
|
||||
func (s *ShakeSizeParser) MaxPaddingLen() uint16 {
|
||||
return 64
|
||||
}
|
||||
|
||||
type AEADSizeParser struct {
|
||||
crypto.AEADChunkSizeParser
|
||||
}
|
||||
|
||||
func NewAEADSizeParser(auth *crypto.AEADAuthenticator) *AEADSizeParser {
|
||||
return &AEADSizeParser{crypto.AEADChunkSizeParser{Auth: auth}}
|
||||
}
|
||||
|
Reference in New Issue
Block a user