Security

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DesDecrypt

func DesDecrypt(crypted, key []byte) ([]byte, error)

DES解密算法

func DesEncrypt

func DesEncrypt(origData, key []byte) ([]byte, error)

DES加密算法

func MD5Encrypt

func MD5Encrypt(origData []byte) []byte

MD5加密

func PKCS5Padding

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

填充

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

解填充

func RsaDecrypt

func RsaDecrypt(ciphertext []byte) ([]byte, error)

RSA解密

func RsaEncrypt

func RsaEncrypt(origData []byte) ([]byte, error)

RSA加密

func SetRsaPrivateKey added in v0.4.0

func SetRsaPrivateKey(key []byte)

SetRsaPrivateKey 设置私钥

func SetRsaPublicKey added in v0.4.0

func SetRsaPublicKey(key []byte)

SetRsaPublicKey 设置公钥

Types

This section is empty.

Jump to

Keyboard shortcuts

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