dkim

package module
v0.0.0-...-3ea6b63 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const (
	VersionKey          = "v"
	AlgorithmKey        = "a"
	DomainKey           = "d"
	SelectorKey         = "s"
	CanonicalizationKey = "c"
	QueryMethodKey      = "q"
	BodyLengthKey       = "l"
	TimestampKey        = "t"
	ExpireKey           = "x"
	FieldsKey           = "h"
	BodyHashKey         = "bh"
	SignatureDataKey    = "b"
	AUIDKey             = "i"
	CopiedFieldsKey     = "z"
)
View Source
const (
	AlgorithmSHA256 = "rsa-sha256"
)
View Source
const (
	SignatureHeaderKey = "DKIM-Signature"
)

Variables

View Source
var StdSignableHeaders = []string{
	"Cc",
	"Content-Type",
	"Date",
	"From",
	"Reply-To",
	"Subject",
	"To",
	SignatureHeaderKey,
}

Functions

This section is empty.

Types

type Conf

type Conf map[string]string

func NewConf

func NewConf(domain string, selector string) (Conf, error)

func (Conf) Algorithm

func (c Conf) Algorithm() string

func (Conf) Hash

func (c Conf) Hash() crypto.Hash

func (Conf) RelaxedBody

func (c Conf) RelaxedBody() bool

func (Conf) RelaxedHeader

func (c Conf) RelaxedHeader() bool

func (Conf) String

func (c Conf) String() string

func (Conf) Validate

func (c Conf) Validate() error

type DKIM

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

func New

func New(conf Conf, keyPEM []byte) (d *DKIM, err error)

func (*DKIM) Sign

func (d *DKIM) Sign(eml []byte) (signed []byte, err error)

type Signer

type Signer interface {
	Sign(eml []byte) (signed []byte, err error)
}

Jump to

Keyboard shortcuts

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