MCPcopy Index your code
hub / github.com/tailscale/tailscale / NewMachine

Function NewMachine

types/key/machine.go:42–47  ·  view source on GitHub ↗

NewMachine creates and returns a new machine private key.

()

Source from the content-addressed store, hash-verified

40
41// NewMachine creates and returns a new machine private key.
42func NewMachine() MachinePrivate {
43 var ret MachinePrivate
44 rand(ret.k[:])
45 clamp25519Private(ret.k[:])
46 return ret
47}
48
49// IsZero reports whether k is the zero value.
50func (k MachinePrivate) IsZero() bool {

Callers 15

testControlHTTPFunction · 0.92
runDialPlanTestFunction · 0.92
client_test.goFile · 0.92
runMethod · 0.92
TestConnStdFunction · 0.92
pairWithConnsFunction · 0.92
TestHandshakeFunction · 0.92
TestNoReuseFunction · 0.92
TestTamperingFunction · 0.92
TestInteropClientFunction · 0.92
TestInteropServerFunction · 0.92
ClientDeferredFunction · 0.92

Calls 2

randFunction · 0.85
clamp25519PrivateFunction · 0.85

Tested by 15

testControlHTTPFunction · 0.74
runDialPlanTestFunction · 0.74
runMethod · 0.74
TestConnStdFunction · 0.74
pairWithConnsFunction · 0.74
TestHandshakeFunction · 0.74
TestNoReuseFunction · 0.74
TestTamperingFunction · 0.74
TestInteropClientFunction · 0.74
TestInteropServerFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…