forked from jwx-go/crypto-signer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrsa_gen.go
37 lines (32 loc) · 849 Bytes
/
rsa_gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package awssigner
import (
"context"
"github.com/aws/aws-sdk-go-v2/service/kms/types"
)
// WithAlgorithm associates a new types.SigningAlgorithmSpec with the object, which will be used for Sign() and Public()
func (cs *RSA) WithAlgorithm(v types.SigningAlgorithmSpec) *RSA {
return &RSA{
client: cs.client,
alg: v,
ctx: cs.ctx,
kid: cs.kid,
}
}
// WithContext associates a new context.Context with the object, which will be used for Sign() and Public()
func (cs *RSA) WithContext(v context.Context) *RSA {
return &RSA{
client: cs.client,
alg: cs.alg,
ctx: v,
kid: cs.kid,
}
}
// WithKeyID associates a new string with the object, which will be used for Sign() and Public()
func (cs *RSA) WithKeyID(v string) *RSA {
return &RSA{
client: cs.client,
alg: cs.alg,
ctx: cs.ctx,
kid: v,
}
}