data

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(opt KeyGeneratorOptions) ([]byte, []byte, error)

func Thumbprint

func Thumbprint(opt ThumbprintOptions) (string, error)

func WrapParseFileIntoJWKs

func WrapParseFileIntoJWKs(ctx context.Context, fileName string) ([]jwk.Key, error)

Types

type ECGenerator

type ECGenerator struct {
	CurveName string
}

func (ECGenerator) GenerateKey

func (g ECGenerator) GenerateKey() (interface{}, error)

type KeyGenerator

type KeyGenerator interface {
	GenerateKey() (interface{}, error)
}

type KeyGeneratorOptions

type KeyGeneratorOptions struct {
	Generator               KeyGenerator
	GeneratePublicComponent bool
	WrapInJwks              OptionForEachComponent

	Usage              KeyUsage
	IDMethod           string
	IDThumbprintMethod KeyThumbprint
}

type KeyThumbprint

type KeyThumbprint int
const (
	KeyThumbprintSHA256 KeyThumbprint = iota
	KeyThumbprintSHA512
)

type KeyType

type KeyType int

type KeyUsage

type KeyUsage string
const (
	KeyUsageSignature  KeyUsage = "sig"
	KeyUsageEncryption KeyUsage = "enc"
)

type OKPGenerator

type OKPGenerator struct {
}

func (OKPGenerator) GenerateKey

func (g OKPGenerator) GenerateKey() (interface{}, error)

type OptionForEachComponent

type OptionForEachComponent struct {
	Public  bool
	Private bool
}

type RSAGenerator

type RSAGenerator struct {
	Bits int
}

func (RSAGenerator) GenerateKey

func (g RSAGenerator) GenerateKey() (interface{}, error)

type ThumbprintOptions

type ThumbprintOptions struct {
	InputFile string
	Method    KeyThumbprint
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL