Rename root, api and sdk module paths (imports, go.mod, go_package, ldflags, build scripts, buf configs) and regenerate protobuf/gateway code with the project's pinned toolchain. Wire identifiers unchanged. api gets a local replace for sdk; root/api/sdk require v0.1.0. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
21 lines
624 B
Go
21 lines
624 B
Go
// Copyright IBM Corp. 2020, 2026
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
package event
|
|
|
|
import (
|
|
"context"
|
|
|
|
"repo.anhonesthost.net/CyberCoveLLC/threshold/internal/libs/crypto"
|
|
wrapping "github.com/hashicorp/go-kms-wrapping/v2"
|
|
)
|
|
|
|
type signer func(context.Context, []byte) (string, error)
|
|
|
|
func newSigner(_ context.Context, w wrapping.Wrapper, info, salt []byte) (signer, error) {
|
|
const op = "event.hmacHclogSigner"
|
|
return func(requestCtx context.Context, data []byte) (string, error) {
|
|
return crypto.HmacSha256(requestCtx, data, w, info, salt, crypto.WithPrefix("hmac-sha256:"), crypto.WithBase64Encoding())
|
|
}, nil
|
|
}
|