authenticity

package
v2.7.0-beta.8 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SignatureAlgFromProto = map[string]SignatureAlg{
		"ES256K": ECDSA,
		"ENS":    ENS,
		"BJJ":    BJJ,
	}
)

Functions

This section is empty.

Types

type Signature

type Signature struct {
	Signature   string
	Alg         string
	Kid         string
	MessageHash string
	Subject     *string
}

func NewSignatureFromProto

func NewSignatureFromProto(s *proto.Signature) Signature

func (*Signature) GetAlg

func (s *Signature) GetAlg() SignatureAlg

func (Signature) ToProto

func (s Signature) ToProto() *proto.Signature

type SignatureAlg

type SignatureAlg int32
const (
	ECDSA                      SignatureAlg = iota
	ENS                        SignatureAlg = iota
	BJJ                        SignatureAlg = iota
	UNRECOGNIZED_SIGNATURE_ALG SignatureAlg = -1
)

type SignatureHeaderJws added in v2.7.0

type SignatureHeaderJws struct {
	Alg string
	Kid string
}

func NewSignatureHeaderJwsFromProto added in v2.7.0

func NewSignatureHeaderJwsFromProto(s *proto.SignatureHeaderJWS) SignatureHeaderJws

func (SignatureHeaderJws) ToProto added in v2.7.0

type SignatureJws added in v2.7.0

type SignatureJws struct {
	Signature   string
	Protected   string
	Header      SignatureHeaderJws
	MessageHash string
}

func NewSignatureJwsFromProto added in v2.7.0

func NewSignatureJwsFromProto(s *proto.SignatureJWS) SignatureJws

func (*SignatureJws) GetAlg added in v2.7.0

func (s *SignatureJws) GetAlg() SignatureAlg

func (SignatureJws) ToProto added in v2.7.0

func (s SignatureJws) ToProto() *proto.SignatureJWS

type Signer

type Signer struct {
	LocalKey           *key.LocalKey
	ManagedKey         *key.ManagedKey
	ManagedCertificate *key.ManagedCertificate
	LocalCertificate   *key.LocalCertificate
}

func NewSignerWithLocalCertificate added in v2.7.0

func NewSignerWithLocalCertificate(key key.LocalCertificate) Signer

func NewSignerWithLocalKey added in v2.7.0

func NewSignerWithLocalKey(key key.LocalKey) Signer

func NewSignerWithManagedCertificate added in v2.7.0

func NewSignerWithManagedCertificate(key key.ManagedCertificate) Signer

func NewSignerWithManagedKey added in v2.7.0

func NewSignerWithManagedKey(key key.ManagedKey) Signer

func (Signer) ToProto

func (s Signer) ToProto() *proto.Signer

Jump to

Keyboard shortcuts

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