MCPcopy
hub / github.com/wavetermdev/waveterm / SetPublicKey

Function SetPublicKey

pkg/wavejwt/wavejwt.go:56–64  ·  view source on GitHub ↗
(keyData []byte)

Source from the content-addressed store, hash-verified

54}
55
56func SetPublicKey(keyData []byte) error {
57 if len(keyData) != ed25519.PublicKeySize {
58 return fmt.Errorf("invalid public key size: expected %d, got %d", ed25519.PublicKeySize, len(keyData))
59 }
60 globalLock.Lock()
61 defer globalLock.Unlock()
62 publicKey = ed25519.PublicKey(keyData)
63 return nil
64}
65
66func GetPublicKey() []byte {
67 globalLock.Lock()

Callers 5

InitMainServerFunction · 0.92
SetupJobManagerFunction · 0.92
serverRunRouterFunction · 0.92
initTestHarnessFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected