utils

package
v0.0.0-...-52eb507 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptByAES

func DecryptByAES(content []byte, key []byte) (out []byte, err error)

func DecryptByRSA

func DecryptByRSA(content []byte, privateKey *rsa.PrivateKey) (out []byte, err error)

func EncryptByAES

func EncryptByAES(content []byte, key []byte) (out []byte, err error)

func EncryptByRSA

func EncryptByRSA(content []byte, publicKey *rsa.PublicKey) (out []byte, err error)

func GenerateSecret

func GenerateSecret() (secret []byte, err error)

func LoadRSAPrivateKeyFromFile

func LoadRSAPrivateKeyFromFile(path string) (key *rsa.PrivateKey, err error)

func LoadRSAPublicKeyFromFile

func LoadRSAPublicKeyFromFile(path string) (key *rsa.PublicKey, err error)

func TarGiz

func TarGiz(source string) (out []byte, err error)

func UnTarGiz

func UnTarGiz(content []byte, target string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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