crypto

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

AES-128-CBC

Index

Constants

View Source
const (
	ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
	ALPHANUM = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
	ALPHASYM = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz~!@#$%^&*_+?-="
)

Variables

This section is empty.

Functions

func CheckHMACSHA1

func CheckHMACSHA1(message, messageMAC, key []byte) bool

func HMACSHA1

func HMACSHA1(message, key []byte) string

func MD5

func MD5(b []byte) string

func PKCS5Padding

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

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

func PKCS7Padding

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

ECB PKCS7Padding

func PKCS7Unpadding

func PKCS7Unpadding(origData []byte) []byte

ECB PKCS7Unpadding

func PswDecrypt

func PswDecrypt(sKey, src string) string

解密

func PswEncrypt

func PswEncrypt(sKey, src string) string

加密

func RandomBytes

func RandomBytes(count int) []byte

RandomBytes 获取随机字符

func RandomInt

func RandomInt(start, end int) int

func RandomInt64

func RandomInt64(start, end int64) int64

func RandomString

func RandomString(count int, set ...[]byte) string

RandomString 获取随机字符串

func RandomUUID

func RandomUUID() string

func RsaDecryptByPri

func RsaDecryptByPri(pri_key_file string, ciphertext []byte) ([]byte, error)

私钥解密

func RsaEncryptByPub

func RsaEncryptByPub(pub_key_file string, origData []byte) ([]byte, error)

公钥加密

func SHA1

func SHA1(b []byte) string

func TripleEcbDesDecrypt

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

[golang ECB 3DES Decrypt]

func TripleEcbDesEncrypt

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

[golang ECB 3DES Encrypt]

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