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
|
// Code generated by tools/cmd/genoptions/main.go. DO NOT EDIT.
package jwa
import "github.com/lestrrat-go/option"
type Option = option.Interface
// RegisterAlgorithmOption describes options that can be passed to the algorithm registering
// functions that support options such as RegisterKeyEncryptionAlgorithmWithOptions.
type RegisterAlgorithmOption interface {
Option
registerAlgorithmOption()
}
type registerAlgorithmOption struct {
Option
}
func (*registerAlgorithmOption) registerAlgorithmOption() {}
type identSymmetricAlgorithm struct{}
func (identSymmetricAlgorithm) String() string {
return "WithSymmetricAlgorithm"
}
// WithSymmetricAlgorithm lets the library know whether the algorithm is symmetric. This affects
// the response of the `IsSymmetric` method of the algorithm. If the algorithms does not support
// this method, using this option will result in an error.
func WithSymmetricAlgorithm(v bool) RegisterAlgorithmOption {
return ®isterAlgorithmOption{option.New(identSymmetricAlgorithm{}, v)}
}
|