mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-04-26 07:29:09 -04:00
remove unnecessary memory allocation in vmess
This commit is contained in:
@@ -180,7 +180,9 @@ func (this *VMessRequest) ToBytes(timestampGenerator RandomTimestampGenerator, b
|
||||
idHash := IDHash(this.User.AnyValidID().Bytes())
|
||||
idHash.Write(timestamp.Bytes())
|
||||
|
||||
buffer.Append(idHash.Sum(nil))
|
||||
hashStart := buffer.Len()
|
||||
buffer.Slice(0, hashStart+16)
|
||||
idHash.Sum(buffer.Value[hashStart:hashStart])
|
||||
|
||||
encryptionBegin := buffer.Len()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user