crypto

package
v0.0.0-...-9776fe2 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToPublicKey

func BytesToPublicKey(pub string) (*rsa.PublicKey, error)

BytesToPublicKey convert Miniserver formatted PEM to rsa public key object

func ComputeHmac1

func ComputeHmac1(message string, secret string) string

func ComputeHmac256

func ComputeHmac256(message string, secret string) string

func CreateEncryptKey

func CreateEncryptKey(size int32) string

func DecryptAES

func DecryptAES(cypherEncoded string, uniqueKey string, ivKey string) ([]byte, error)

func EncryptAES

func EncryptAES(plainText string, uniqueKey string, ivKey string) (string, error)

func EncryptWithPublicKey

func EncryptWithPublicKey(msg []byte, pub *rsa.PublicKey) (string, error)

func Sha1Hash

func Sha1Hash(data string) string

func Sha256Hash

func Sha256Hash(data string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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