mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-17 23:06:30 -05:00
refactor
This commit is contained in:
parent
7392bb495b
commit
97a09bb5bd
@ -20,6 +20,7 @@ func BytesToUint32(value []byte) uint32 {
|
|||||||
uint32(value[3])
|
uint32(value[3])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// BytesToInt deserializes a bytes array (of at leat 4 bytes) to an int in big endian order.
|
||||||
func BytesToInt(value []byte) int {
|
func BytesToInt(value []byte) int {
|
||||||
return int(value[0])<<24 |
|
return int(value[0])<<24 |
|
||||||
int(value[1])<<16 |
|
int(value[1])<<16 |
|
||||||
|
Loading…
Reference in New Issue
Block a user