crypto

package
v0.0.0-...-cc87309 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2021 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package crypto provides functions and types for cryptographic operations (DNSSEC, TLS, ARGON2)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCertRequest

func NewCertRequest(domain string)

NewCertRequest requests a new TLS certificate

func PasswordHash

func PasswordHash(plaintext string) ([]byte, error)

PasswordHash hashes a plaintext string and returns an argon2 hash byte slice

func RandomString

func RandomString() string

RandomString returns a securely generated random string

func ValidHash

func ValidHash(payload []byte, plaintext string) bool

ValidHash validates a hash and provided plaintext password

Types

type AcmeUser

type AcmeUser struct {
	Email        string
	Registration *registration.Resource
	// contains filtered or unexported fields
}

AcmeUser implements acme.User

func (*AcmeUser) GetEmail

func (u *AcmeUser) GetEmail() string

func (*AcmeUser) GetPrivateKey

func (u *AcmeUser) GetPrivateKey() crypto.PrivateKey

func (AcmeUser) GetRegistration

func (u AcmeUser) GetRegistration() *registration.Resource

type DNSSECKey

type DNSSECKey struct {
	Base           string `json:"base"`           // base key filename prefix
	Key            string `json:"key"`            // DNSKEY
	Private        string `json:"private"`        // private key
	DSKeyTag       int    `json:"dskeytag"`       // DS key tag
	DSAlgo         int    `json:"dsalgo"`         // DS algorithm
	DSDigestType   int    `json:"dsdigesttype"`   // DS digest type
	DSDigest       string `json:"dsdigest"`       // DS digest
	DSRecordString string `json:"dsrecordstring"` // full DS record in zone file format
}

DNSSECKey stores all attributes for a DNSSEC signing key

func NewKey

func NewKey(zone string) DNSSECKey

NewKey generates a new DNSSEC signing key for a zone

Jump to

Keyboard shortcuts

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