crypto

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: MIT Imports: 8 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 RSAEncrypt

func RSAEncrypt(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