signer

package
v0.0.0-...-d1463b1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const MemoryScheme = "memory"
View Source
const TinkScheme = "tink"

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, signer, pass, tinkKEKURI, tinkKeysetPath string) (signature.Signer, error)

func NewTinkSigner

func NewTinkSigner(ctx context.Context, kekURI, keysetPath string) (signature.Signer, error)

NewTinkSigner returns a signature.SignerVerifier that wraps crypto.Signer and a hash function. Provide a path to the encrypted keyset and cloud KMS key URI for decryption

func NewTinkSignerWithHandle

func NewTinkSignerWithHandle(kek tink.AEAD, keysetPath string) (signature.Signer, error)

NewTinkSignerWithHandle returns a signature.SignerVerifier that wraps crypto.Signer and a hash function. Provide a path to the encrypted keyset and a key handle for decrypting the keyset

Types

type File

type File struct {
	signature.SignerVerifier
}

returns an file based signer and verify, used for spinning up local instances

func NewFile

func NewFile(keyPath, keyPass string) (*File, error)

type Memory

type Memory struct {
	signature.ECDSASignerVerifier
}

returns an in-memory signer and verify, used for spinning up local instances

func NewMemory

func NewMemory() (*Memory, error)

type SigningConfig

type SigningConfig struct {
	SigningSchemeOrKeyPath string `json:"signingSchemeOrKeyPath" yaml:"signingSchemeOrKeyPath"`
	FileSignerPassword     string `json:"fileSignerPassword" yaml:"fileSignerPassword"`
	TinkKEKURI             string `json:"tinkKEKURI" yaml:"tinkKEKURI"`
	TinkKeysetPath         string `json:"tinkKeysetPath" yaml:"tinkKeysetPath"`
}

SigningConfig initializes the signer for a specific shard

func (SigningConfig) IsUnset

func (sc SigningConfig) IsUnset() bool

Jump to

Keyboard shortcuts

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