cert

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64Decode

func Base64Decode(s string) ([]byte, error)

func Base64Encode

func Base64Encode(src []byte) string

func CheckRSAKey

func CheckRSAKey(pub []byte, pri []byte) bool

func CreateDesKey

func CreateDesKey() []byte

func CreateRSAKeys

func CreateRSAKeys() (pub []byte, pri []byte, err error)

func MD5

func MD5(data []byte) string

md5加密

func MD5String

func MD5String(data string) string

func PKCS5Padding

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

func PKCS5UnPadding

func PKCS5UnPadding(src []byte) []byte

func RSADecrypt

func RSADecrypt(priKey []byte, ciphertext []byte) ([]byte, error)

func RSAEncryp

func RSAEncryp(pubKey []byte, origData []byte) ([]byte, error)

func TripleDesDecrypt

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

3DES解密

func TripleDesEncrypt

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

3DES加密

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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