xcrypto

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2023 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesCBCDecrypt added in v0.0.6

func AesCBCDecrypt(crypted, key, iv []byte) ([]byte, error)

AesCBCDecrypt ase-128-cbc 解密

func AesCBCEncrypt added in v0.0.6

func AesCBCEncrypt(data, key, iv []byte) ([]byte, error)

AesCBCEncrypt AES-128-CBC 加密

func AesECBDecrypt added in v0.0.6

func AesECBDecrypt(text, key string) string

AesECBDecrypt ...

func AesECBEncrypt added in v0.0.6

func AesECBEncrypt(text, key string) string

AesECBEncrypt ...

func AesMysqlDecrypt

func AesMysqlDecrypt(text, key string) string

AesMysqlDecrypt 同 mysql aes_decrypt(unhex('text'), 'key')

func AesMysqlEncrypt

func AesMysqlEncrypt(text, key string) string

AesMysqlEncrypt 同 mysql hex(aes_encrypt('text', 'key'))

func Hash

func Hash(str string, seed int) uint64

Hash ...

func HmacSha256

func HmacSha256(src string, secret string) string

HmacSha256 ...

func Md5

func Md5(str string) string

Md5 ...

func PKCS7Padding added in v0.0.6

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

PKCS7Padding ...

func PKCS7UnPadding added in v0.0.6

func PKCS7UnPadding(origData []byte) []byte

PKCS7UnPadding ...

func RsaPriDecrypt

func RsaPriDecrypt(text, key string) (string, error)

RsaPriDecrypt 私钥解密

func RsaPriEncrypt

func RsaPriEncrypt(text, key string) (string, error)

RsaPriEncrypt 私钥加密

func RsaPubDecrypt

func RsaPubDecrypt(text, key string) (string, error)

RsaPubDecrypt 公钥解密

func RsaPubEncrypt

func RsaPubEncrypt(text, key string) (string, error)

RsaPubEncrypt 公钥加密

func Sha1 added in v0.0.2

func Sha1(str string) string

Sha1 ...

func Sha256 added in v0.0.5

func Sha256(str string) string

Sha256 ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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