plain

package
v0.3.12 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package plain contains the logic related to the plain key management.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EcdsaKey

type EcdsaKey struct {
	// contains filtered or unexported fields
}

EcdsaKey represents a public ecdsa key.

func NewEcdsaKey

func NewEcdsaKey(key *ecdsa.PublicKey) (*EcdsaKey, error)

NewEcdsaKey returns a new EcdsaKey.

func (*EcdsaKey) ID

func (p *EcdsaKey) ID() string

ID returns the fingerprint of the key.

func (*EcdsaKey) Verify

func (p *EcdsaKey) Verify(data, signature []byte) error

Verify verifies the signature of the given data using the public key. This method expects signature to be in r||s format, not DER encoded.

type Key

type Key interface {
	Verify(data, signature []byte) error
	ID() string
}

Key is the plain key.

func ParseKey

func ParseKey(data []byte) (Key, error)

ParseKey creates a key from the PEM encoded data.

Jump to

Keyboard shortcuts

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