crypto

package
v0.0.0-...-d64fc3f Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadPublicKey = errors.New(10000, "public key is bad", "")
)

Functions

func DecryptPrivWithAES

func DecryptPrivWithAES(key, message string) (encry string, err error)

DecryptPrivWithAES 解压

func DecryptPrivWithAES1

func DecryptPrivWithAES1(key, message string) (d string, err error)

func DecryptWithAES

func DecryptWithAES(key, message string) (string, error)

func EncryptPrivWithAES

func EncryptPrivWithAES(key, message string) (string, error)

func EncryptWithAES

func EncryptWithAES(key, message string) (string, error)

func PKCS5Padding

func PKCS5Padding(ciphertext []byte, blockSize int) []byte

func PKCS5Unpadding

func PKCS5Unpadding(encrypt []byte) []byte

func RSADecrypt

func RSADecrypt(cipertext, privatekey []byte) (pb []byte, err error)

func RSAEncrypt

func RSAEncrypt(orgidata []byte, publickey []byte) (pb []byte, err error)

func RSAGen

func RSAGen() (puk string, priv string, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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