dkim

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DKIMService

type DKIMService struct{}

This is a placeholder for the actual service

func (*DKIMService) GetDKIMConfig

func (s *DKIMService) GetDKIMConfig(domainName string) (*domain.DKIMConfig, error)

type DKIMServiceInterface

type DKIMServiceInterface interface {
	GetDKIMConfig(domainName string) (*domain.DKIMConfig, error)
}

DKIMServiceInterface defines methods needed by DKIM components

type KeyPair

type KeyPair struct {
	PrivateKey string
	PublicKey  string
	Selector   string
}

func GenerateEd25519KeyPair

func GenerateEd25519KeyPair() (*KeyPair, error)

func GenerateRSAKeyPair

func GenerateRSAKeyPair(bits int) (*KeyPair, error)

func (*KeyPair) DNSRecord

func (kp *KeyPair) DNSRecord() string

DNSRecord generates the DNS TXT record content for the public key.

type Signer

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

func NewSigner

func NewSigner() *Signer

func NewSignerWithService

func NewSignerWithService(domainService DKIMServiceInterface) *Signer

func (*Signer) Sign

func (s *Signer) Sign(domainName string, message []byte) ([]byte, error)

type VerificationResult

type VerificationResult struct {
	Valid       bool
	Domain      string
	Selector    string
	Error       error
	HeaderField string
}

type Verifier

type Verifier struct{}

func NewVerifier

func NewVerifier() *Verifier

func (*Verifier) Verify

func (v *Verifier) Verify(message []byte) ([]*VerificationResult, error)

Jump to

Keyboard shortcuts

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