SignBytes signs bytes using a private key unique to your application.
(c context.Context, bytes []byte)
| 126 | |
| 127 | // SignBytes signs bytes using a private key unique to your application. |
| 128 | func SignBytes(c context.Context, bytes []byte) (keyName string, signature []byte, err error) { |
| 129 | req := &pb.SignForAppRequest{BytesToSign: bytes} |
| 130 | res := &pb.SignForAppResponse{} |
| 131 | |
| 132 | if err := internal.Call(c, "app_identity_service", "SignForApp", req, res); err != nil { |
| 133 | return "", nil, err |
| 134 | } |
| 135 | return res.GetKeyName(), res.GetSignatureBytes(), nil |
| 136 | } |
| 137 | |
| 138 | func init() { |
| 139 | internal.RegisterErrorCodeMap("app_identity_service", pb.AppIdentityServiceError_ErrorCode_name) |
nothing calls this directly
no test coverage detected
searching dependent graphs…