encrypt

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(cryted string, key string) (string, error)

func AesDecryptByte

func AesDecryptByte(cryted string, key string) ([]byte, error)

func AesEncrypt

func AesEncrypt(orig string, key string) (string, error)

func AesEncryptByte

func AesEncryptByte(origData []byte, key string) (string, error)

func GenRsaKey

func GenRsaKey(bits int) (string, string, error)

生成私钥文件

func MD5 added in v0.0.2

func MD5(str string) string

func MD5Equal added in v0.0.2

func MD5Equal(a, md string) bool

func RsaDecrypt

func RsaDecrypt(ciphertext, privateKey []byte) ([]byte, error)

解密

func RsaEncrypt

func RsaEncrypt(origData, publicKey []byte) ([]byte, error)

加密

func Sha1 added in v0.0.2

func Sha1(str string) string

func Sha1Equal added in v0.0.2

func Sha1Equal(a, sh string) bool

func Sha256 added in v0.0.2

func Sha256(str string) string

func Sha256Equal added in v0.0.2

func Sha256Equal(a, sh string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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