crypto

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DesCBCDecrypt

func DesCBCDecrypt(src, key string) string

CBC解密

func DesCBCEncrypt

func DesCBCEncrypt(src, key string) string

CBC加密

func DesDecrypt

func DesDecrypt(data []byte, key string) ([]byte, error)

ECB解密

func DesEncrypt

func DesEncrypt(data []byte, key string) ([]byte, error)

ECB加密

func PKCS5Padding

func PKCS5Padding(encryptedData []byte, blockSize int) []byte

明文补码算法

func PKCS5UnPadding

func PKCS5UnPadding(plainData []byte) []byte

明文减码算法

func RsaDecryptWithSha1Base64

func RsaDecryptWithSha1Base64(encryptedData, privateKey string) (string, error)

解密:对采用sha1算法加密后转base64格式的数据进行解密(私钥PKCS1格式)

func RsaEncryptWithSha1Base64

func RsaEncryptWithSha1Base64(plainData, publicKey string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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