crypto

package
v0.0.0-...-e6b3349 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2019 License: MIT Imports: 14 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 bytes to public key

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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