crypto

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESEncryptCBC

func AESEncryptCBC(origData []byte, key []byte) (encrypted []byte)

func PKCS7Padding

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

func RSADecrypt

func RSADecrypt(encrypt_text string, priv_key *rsa.PrivateKey) (plain_text string, err error)

func RSADecryptFromBase64String added in v0.0.5

func RSADecryptFromBase64String(encrypt_text string, priv_key *rsa.PrivateKey) (plain_text string, err error)

func RSADecryptFromHexString added in v0.0.5

func RSADecryptFromHexString(encrypt_text string, priv_key *rsa.PrivateKey) (plain_text string, err error)

func RSAEncrypt

func RSAEncrypt(plain_text string, pub_key *rsa.PublicKey) (encrypt_text string, err error)

func RSAEncryptToBase64String added in v0.0.5

func RSAEncryptToBase64String(plain_text string, pub_key *rsa.PublicKey) (encrypt_text string, err error)

func RSAEncryptToHexString added in v0.0.5

func RSAEncryptToHexString(plain_text string, pub_key *rsa.PublicKey) (encrypt_text string, err error)

func RSAReadPrivateKey

func RSAReadPrivateKey(priv_key_string string) (priv_key *rsa.PrivateKey, err error)

解析 string 为 rsa.PrivateKey 类型

func RSAReadPublicKey

func RSAReadPublicKey(pub_key_string string) (pub_key *rsa.PublicKey, err error)

解析 string 为 rsa.PublicKey 类型

Types

This section is empty.

Jump to

Keyboard shortcuts

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