mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-23 19:42:09 +00:00
types/key: export constants for key size, not a method.
Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
@@ -21,6 +21,10 @@ const (
|
||||
// This prefix is used in the control protocol, so cannot be
|
||||
// changed.
|
||||
discoPublicHexPrefix = "discokey:"
|
||||
|
||||
// DiscoPublicRawLen is the length in bytes of a DiscoPublic, when
|
||||
// serialized with AppendTo, Raw32 or WriteRawWithoutAllocating.
|
||||
DiscoPublicRawLen = 32
|
||||
)
|
||||
|
||||
// DiscoPrivate is a disco key, used for peer-to-peer path discovery.
|
||||
@@ -115,12 +119,6 @@ func (k DiscoPublic) AppendTo(buf []byte) []byte {
|
||||
return append(buf, k.k[:]...)
|
||||
}
|
||||
|
||||
// RawLen returns the length of k when to the format handled by
|
||||
// ReadRawWithoutAllocating and WriteRawWithoutAllocating.
|
||||
func (k DiscoPublic) RawLen() int {
|
||||
return 32
|
||||
}
|
||||
|
||||
// String returns the output of MarshalText as a string.
|
||||
func (k DiscoPublic) String() string {
|
||||
bs, err := k.MarshalText()
|
||||
|
Reference in New Issue
Block a user