cryptoutil

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyAlgorithmRSA     = "rsa"
	KeyAlgorithmEd25519 = "ed25519"
	KeyAlgorithmECDSA   = "ecdsa"
)

Variables

This section is empty.

Functions

func NewECDSAPEM added in v1.1.0

func NewECDSAPEM() ([]byte, error)

NewECDSAPEM creates a new ECDSA key in PEM format.

func NewEd25519PEM added in v1.1.0

func NewEd25519PEM() ([]byte, error)

NewEd25519PEM creates a new ed25519 key in PEM format.

func NewRSAPEM added in v1.1.0

func NewRSAPEM() ([]byte, error)

NewRSAPEM creates a new RSA key in PEM format.

func SHA1

func SHA1(str string) string

SHA1 encodes string to hexadecimal of SHA1 checksum.

Types

type KeyAlgorithm added in v1.1.0

type KeyAlgorithm string

Jump to

Keyboard shortcuts

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