* [COMPLIANCE] Update Copyright and License Headers * chore: make gen to generate files with copyright headers * chore: update missed copyright headers --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Co-authored-by: Justin Nguyen <justin.nguyen@hashicorp.com>
21 lines
609 B
Go
21 lines
609 B
Go
// Copyright IBM Corp. 2020, 2025
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
package event
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/hashicorp/boundary/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
|
|
}
|