Deprecated: This version of github.com/lestrrat-go/jwx is deprecated. Please use github.com/lestrrat-go/jwx/v3 or newer instead.
package jose
import "github.com/lestrrat-go/jwx/internal/jose"
Index ¶
- func Available() bool
- func DecryptJwe(ctx context.Context, t *testing.T, cfile, kfile string) ([]byte, error)
- func EncryptJwe(ctx context.Context, t *testing.T, payload []byte, alg string, keyfile string, enc string, compact bool) (string, func(), error)
- func ExecutablePath() string
- func FmtJwe(ctx context.Context, t *testing.T, data []byte) ([]byte, error)
- func GenerateJwk(ctx context.Context, t *testing.T, template string) (string, func(), error)
- func RunJoseCommand(ctx context.Context, t *testing.T, args []string, outw, errw io.Writer) error
- func SetExecutable(path string)
- func SignJws(ctx context.Context, t *testing.T, payload []byte, keyfile string, compact bool) (string, func(), error)
- func VerifyJws(ctx context.Context, t *testing.T, cfile, kfile string) ([]byte, error)
- type AlgorithmSet
Functions ¶
func Available ¶
func Available() bool
func DecryptJwe ¶
func EncryptJwe ¶
func EncryptJwe(ctx context.Context, t *testing.T, payload []byte, alg string, keyfile string, enc string, compact bool) (string, func(), error)
EncryptJwe creates an encrypted JWE message and returns its filename and a cleanup function. The caller is responsible for calling the cleanup function and make sure all resources are released
func ExecutablePath ¶
func ExecutablePath() string
func FmtJwe ¶
func GenerateJwk ¶
GenerateJwk creates a new key using the jose tool, and returns its filename and a cleanup function. The caller is responsible for calling the cleanup function and make sure all resources are released
func RunJoseCommand ¶
func SetExecutable ¶
func SetExecutable(path string)
func SignJws ¶
func SignJws(ctx context.Context, t *testing.T, payload []byte, keyfile string, compact bool) (string, func(), error)
SignJws signs a message and returns its filename and a cleanup function. The caller is responsible for calling the cleanup function and make sure all resources are released
func VerifyJws ¶
Types ¶
type AlgorithmSet ¶
type AlgorithmSet struct {
// contains filtered or unexported fields
}
func Algorithms ¶
func NewAlgorithmSet ¶
func NewAlgorithmSet() *AlgorithmSet
func (*AlgorithmSet) Add ¶
func (set *AlgorithmSet) Add(s string)
func (*AlgorithmSet) Has ¶
func (set *AlgorithmSet) Has(s string) bool
Source Files ¶
- Version
- v1.2.31 (latest)
- Published
- Apr 9, 2025
- Platform
- linux/amd64
- Imports
- 11 packages
- Last checked
- 3 weeks ago –
Tools for package owners.