mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-29 16:58:34 +00:00
parent
157918859f
commit
822afb0cc8
2 changed files with 28 additions and 8 deletions
|
@ -50,6 +50,8 @@ func (u *UUID) Equals(another *UUID) bool {
|
|||
func New() UUID {
|
||||
var uuid UUID
|
||||
common.Must2(rand.Read(uuid.Bytes()))
|
||||
uuid[6] = (uuid[6] & 0x0f) | (4 << 4)
|
||||
uuid[8] = (uuid[8]&(0xff>>2) | (0x02 << 6))
|
||||
return uuid
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue