1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-01 06:55:25 -05:00
This commit is contained in:
Darien Raymond
2016-12-07 13:13:48 +01:00
parent 2f550186ac
commit 2e1c2b95e0

View File

@@ -5,7 +5,6 @@ import (
"crypto/md5"
"hash"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/uuid"
)
@@ -13,10 +12,6 @@ const (
IDBytesLen = 16
)
var (
InvalidID = errors.New("Invalid ID.")
)
type IDHash func(key []byte) hash.Hash
func DefaultIDHash(key []byte) hash.Hash {
@@ -29,6 +24,7 @@ type ID struct {
cmdKey [IDBytesLen]byte
}
// Equals returns true if this ID equals to the other one.
func (v *ID) Equals(another *ID) bool {
return v.uuid.Equals(another.uuid)
}