encrypt

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64ToString

func Base64ToString(str string) string

func Decrypt

func Decrypt(key string, iv string, str string) (string, error)

func Encrypt

func Encrypt(key string, iv string, str string) (string, error)

加密 aes-128-cbc

func GetRSAkey

func GetRSAkey(bits int) error

生成RSA私钥和公钥

func Md5

func Md5(str string) string

func PKCS7Padding

func PKCS7Padding(origData []byte, blockSize int) []byte

补码

func PKCS7upPadding

func PKCS7upPadding(origData []byte) []byte

去掉字符

func PrivateRSADecrypt

func PrivateRSADecrypt(str, key string) (string, error)

rsa私钥解密

func PublicRSAEncrypt

func PublicRSAEncrypt(str, key string) (string, error)

rsa公钥加密

func StringToBase64

func StringToBase64(str 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