crypto

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESEncryptStreamReader

func AESEncryptStreamReader(key []byte, dst io.Writer, src io.Reader) (int64, error)

AESEncryptStreamReader 对文件流进行AES解密

func AESEncryptStreamWriter

func AESEncryptStreamWriter(key []byte, dst io.Writer, src io.Reader) (int64, error)

AESEncryptStreamWriter 对文件流进行AES加密

func DESDecrypt

func DESDecrypt(cipherText []byte) []byte

DESDecrypt DES解密

func DESEncrypt

func DESEncrypt(plaintext []byte) []byte

DESEncrypt DES加密

func DESGroupFill

func DESGroupFill(plaintext []byte) []byte

func GenerateRSAKey

func GenerateRSAKey(bits int) (privateKey, publicKey string, err error)

func RSADecrypt

func RSADecrypt(cipherText []byte, privateKey string) ([]byte, error)

RSADecrypt RSA解密

func RSADecryptBase64

func RSADecryptBase64(cipherText string, privateKey string) ([]byte, error)

RSADecryptBase64 RSA解密-Base64

func RSADecryptHex

func RSADecryptHex(cipherText string, privateKey string) ([]byte, error)

RSADecryptHex RSA解密-Hex

func RSAEncrypt

func RSAEncrypt(plainText []byte, publicKey string) ([]byte, error)

RSAEncrypt RSA加密

func RSAEncryptBase64

func RSAEncryptBase64(plainText []byte, publicKey string) (string, error)

RSAEncryptBase64 RSA加密-Base64

func RSAEncryptHex

func RSAEncryptHex(plainText []byte, publicKey string) (string, error)

RSAEncryptHex RSA加密-Hex

Types

This section is empty.

Jump to

Keyboard shortcuts

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