crypto

package
v0.0.0-...-82f49f0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 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