mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-09 08:01:31 +00:00
all: use syncs.AtomicValue
Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
@@ -107,3 +107,13 @@ func (k NLPublic) MarshalText() ([]byte, error) {
|
||||
func (k NLPublic) Verifier() ed25519.PublicKey {
|
||||
return ed25519.PublicKey(k.k[:])
|
||||
}
|
||||
|
||||
// IsZero reports whether k is the zero value.
|
||||
func (k NLPublic) IsZero() bool {
|
||||
return k.Equal(NLPublic{})
|
||||
}
|
||||
|
||||
// Equal reports whether k and other are the same key.
|
||||
func (k NLPublic) Equal(other NLPublic) bool {
|
||||
return subtle.ConstantTimeCompare(k.k[:], other.k[:]) == 1
|
||||
}
|
||||
|
Reference in New Issue
Block a user