alg_ecdsa

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: MIT Imports: 9 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type P256

type P256 struct {
	PrivateKey *ecdsa.PrivateKey
	PublicKey  *ecdsa.PublicKey
	Attrs      any
}

func NewP256Signer

func NewP256Signer(key *ecdsa.PrivateKey) *P256

NewP256Signer returns a signing algorithm based on the provided ecdsa private key.

func NewP256Verifier

func NewP256Verifier(key *ecdsa.PublicKey) *P256

NewP256Verifier returns a verification algorithm based on the provided ecdsa public key.

func (P256) Attributes

func (a P256) Attributes() any

Attributes returns server-side attributes associated with the key.

func (P256) ContentDigest

func (a P256) ContentDigest() contentdigest.Digester

func (P256) Sign

func (a P256) Sign(ctx context.Context, base string) ([]byte, error)

func (P256) Type

func (a P256) Type() string

func (P256) Verify

func (a P256) Verify(ctx context.Context, base string, signature []byte) error

type StaticKeyDirectory

type StaticKeyDirectory struct {
	Key        *ecdsa.PublicKey
	Attributes any
}

StaticKeyDirectory implements the verifier.KeyDirectory interface. It returns a static key regardless of the provided Key ID argument.

func (StaticKeyDirectory) GetKey

Jump to

Keyboard shortcuts

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