MCPcopy Create free account
hub / github.com/daodst/chat / NewSharedSecretRegistrationRequest

Function NewSharedSecretRegistrationRequest

clientapi/routing/register_secret.go:29–38  ·  view source on GitHub ↗
(reader io.ReadCloser)

Source from the content-addressed store, hash-verified

27}
28
29func NewSharedSecretRegistrationRequest(reader io.ReadCloser) (*SharedSecretRegistrationRequest, error) {
30 defer internal.CloseAndLogIfError(context.Background(), reader, "NewSharedSecretRegistrationRequest: failed to close request body")
31 var ssrr SharedSecretRegistrationRequest
32 err := json.NewDecoder(reader).Decode(&ssrr)
33 if err != nil {
34 return nil, err
35 }
36 ssrr.MacBytes, err = hex.DecodeString(ssrr.MacStr)
37 return &ssrr, err
38}
39
40type SharedSecretRegistration struct {
41 sharedSecret string

Callers 2

TestSharedSecretRegisterFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestSharedSecretRegisterFunction · 0.68