crypto

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptAES

func DecryptAES(key string, inputData []byte) ([]byte, error)

DecryptAES decrypts an AES-protected message using GCM.

func EncryptAES

func EncryptAES(key string, inputData []byte) ([]byte, error)

EncryptAES encrypts a message with AES using GCM.

func GenerateAESKey

func GenerateAESKey(keySize int) (string, error)

GenerateAESKey creates a new AES key for encryption.

func GenerateX509Certificate

func GenerateX509Certificate(hostname string, organizationName string, validFrom time.Time, validFor time.Duration, isCertAuthority bool, rsaBits int, ecdsaCurve string) ([]byte, []byte, error)

GenerateX509Certificate generates an X509 certificate for TLS. Based on https://golang.org/src/crypto/tls/generate_cert.go.

Types

This section is empty.

Jump to

Keyboard shortcuts

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