all: replace tailcfg.DiscoKey with key.DiscoPublic.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2021-11-02 14:41:56 -07:00
committed by Brad Fitzpatrick
parent f771327f0c
commit 0532eb30db
16 changed files with 51 additions and 95 deletions

View File

@@ -22,13 +22,16 @@ func testNodeKey(b byte) (ret key.NodePublic) {
return key.NodePublicFromRaw32(mem.B(bs[:]))
}
func testDiscoKey(hexPrefix string) (ret tailcfg.DiscoKey) {
func testDiscoKey(hexPrefix string) (ret key.DiscoPublic) {
b, err := hex.DecodeString(hexPrefix)
if err != nil {
panic(err)
}
copy(ret[:], b)
return
// this function is used with short hexes, so zero-extend the raw
// value.
var bs [32]byte
copy(bs[:], b)
return key.DiscoPublicFromRaw32(mem.B(bs[:]))
}
func TestNetworkMapConcise(t *testing.T) {