comTools

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckFileMD5

func CheckFileMD5(fullpath string, checksum string) (ok bool)

func Compress

func Compress(b []byte) []byte

func Decompress

func Decompress(data []byte) []byte

func GetBytesChecksum

func GetBytesChecksum(bs []byte, m string) string

func GetBytesMD5

func GetBytesMD5(bs []byte) string

func GetFileMD5

func GetFileMD5(path string) (checksum string, err error)

func GetStringChecksum

func GetStringChecksum(str string, m string) string

func GetStringMD5

func GetStringMD5(str string) string

func LoadYaml

func LoadYaml(path string, i interface{}) error

func RsaGenKeypair

func RsaGenKeypair() (priKey string, pubKey string)

func RsaGetPublicKey

func RsaGetPublicKey() string

func RsaLoadPrivateKey

func RsaLoadPrivateKey(path string) error

func RsaSavePrivateKey

func RsaSavePrivateKey(priKey *rsa.PrivateKey, filepath string) error

func RsaSha256Sign

func RsaSha256Sign(i interface{}) (signature, pubKey string, err error)

func RsaSha256SignHash

func RsaSha256SignHash(hash string) (signature, pubKey string, err error)

func RsaSha256Verify

func RsaSha256Verify(i interface{}, signature, pubKey string) bool

func RsaSha256VerifyHash

func RsaSha256VerifyHash(hash, signature, pubKey string) bool

func SaveYaml

func SaveYaml(path string, i interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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