mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-06 00:31:03 +00:00
refactor bytes functions
This commit is contained in:
16 files changed
+78
-64
No files matched your search
@@ -29,8 +29,7 @@ func (this *SimpleAuthenticator) HeaderSize() int {
|
||||
}
|
||||
|
||||
func (this *SimpleAuthenticator) Seal(buffer *alloc.Buffer) {
|
||||
var length uint16 = uint16(buffer.Len())
|
||||
buffer.Prepend(serial.Uint16ToBytes(length))
|
||||
buffer.PrependUint16(uint16(buffer.Len()))
|
||||
fnvHash := fnv.New32a()
|
||||
fnvHash.Write(buffer.Value)
|
||||
|
||||
|
||||
Reference in new issue
Block a user