crypto

package
v0.0.0-...-f6c0e8d Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2020 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeBase64

func DecodeBase64(code string) ([]byte, error)

func DecryptAES

func DecryptAES(src []byte, key []byte) ([]byte, error)

func EncodeBase64

func EncodeBase64(code []byte) string

func EncryptAES

func EncryptAES(src []byte, key []byte) ([]byte, error)

func GenerateRSAKey

func GenerateRSAKey(bits int, privatepath, publicpath string) error

生成RSA私钥和公钥,保存到文件中

func RSA_Decrypt

func RSA_Decrypt(cipherText []byte, buf []byte) ([]byte, error)

RSA解密

func RSA_Decrypt_Keyfile

func RSA_Decrypt_Keyfile(cipherText []byte, path string) ([]byte, error)

RSA解密

func RSA_Encrypt

func RSA_Encrypt(plainText []byte, buf []byte) ([]byte, error)

RSA加密

func RSA_Encrypt_Keyfile

func RSA_Encrypt_Keyfile(plainText []byte, path string) ([]byte, error)

Rsa加密

Types

This section is empty.

Jump to

Keyboard shortcuts

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