crypto

package
v0.0.0-...-90f6ff7 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(data, key, iv []byte) ([]byte, error)

解密

func AesEncrypt

func AesEncrypt(data, key []byte) ([]byte, []byte, error)

加密

func Padding

func Padding(src []byte, blockSize int) []byte

Padding PKCS5

func PublicBytes

func PublicBytes(buf []byte) ([]byte, error)

func ReadPublicKey

func ReadPublicKey(filename string) ([]byte, error)

func RsaPemPriDecrypt

func RsaPemPriDecrypt(enc string, privateKey string) (string, error)

私钥解密

func RsaPemPriEncrypt

func RsaPemPriEncrypt(src string, privateKey string) (string, error)

私钥加密

func RsaPemPubDecrypt

func RsaPemPubDecrypt(enc string, publicKey string) (string, error)

公钥解密

func RsaPemPubEncrypt

func RsaPemPubEncrypt(src string, publicKey string) (string, error)

公钥加密

func UnPadding

func UnPadding(src []byte) []byte

UnPadding PKCS5

Types

This section is empty.

Jump to

Keyboard shortcuts

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