MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / SetPrivateKey

Function SetPrivateKey

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

Source from the content-addressed store, hash-verified

78}
79
80func SetPrivateKey(keyData []byte) error {
81 if len(keyData) != ed25519.PrivateKeySize {
82 return fmt.Errorf("invalid private key size: expected %d, got %d", ed25519.PrivateKeySize, len(keyData))
83 }
84 globalLock.Lock()
85 defer globalLock.Unlock()
86 privateKey = ed25519.PrivateKey(keyData)
87 return nil
88}
89
90func ValidateAndExtract(tokenStr string) (*WaveJwtClaims, error) {
91 globalLock.Lock()

Callers 2

InitMainServerFunction · 0.92
initTestHarnessFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected