cert

package
v0.0.0-...-b615adf Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2020 License: BSD-3-Clause Imports: 12 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