Skip to content

Commit

Permalink
Updated the comments for the sign and verify methods to add key types
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfeidau committed Aug 28, 2024
1 parent 8efb3c6 commit 0971b8e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions signature/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ type Key interface {
}

// Sign computes a new signature for an environment (env) combined with an
// object containing values (sf) using a given key.
// object containing values (sf) using a given key. The key can be a jwk.Key
// or a crypto.Signer. If it is a jwk.Key, the public key thumbprint is logged.
func Sign(_ context.Context, key Key, sf SignedFielder, opts ...Option) (*pipeline.Signature, error) {
options := configureOptions(opts...)

Expand Down Expand Up @@ -164,7 +165,8 @@ func Sign(_ context.Context, key Key, sf SignedFielder, opts ...Option) (*pipeli
}

// Verify verifies an existing signature against environment (env) combined with
// an object containing values (sf) using keys from a keySet.
// the keyset. The keySet can be a jwk.Set or a crypto.Signer. If it is a jwk.Set,
// the public key thumbprints are logged.
func Verify(ctx context.Context, s *pipeline.Signature, keySet any, sf SignedFielder, opts ...Option) error {
options := configureOptions(opts...)

Expand Down

0 comments on commit 0971b8e

Please sign in to comment.