crypto

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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 ErrBadPublicKey

func ErrBadPublicKey(format string, a ...interface{}) error

func IsErrBadPublicKey

func IsErrBadPublicKey(err error) bool

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 RSADecryptWitPriv

func RSADecryptWitPriv(cipertext []byte, priv *rsa.PrivateKey) (pb []byte, err error)

func RSAEncrypt

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

func RSAEncryptWithPub

func RSAEncryptWithPub(orgidata []byte, pub *rsa.PublicKey) (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