xcrypto

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesCBCDecrypt

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

AesCBCDecrypt ase-128-cbc 解密

func AesCBCEncrypt

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

AesCBCEncrypt AES-128-CBC 加密

func AesECBDecrypt

func AesECBDecrypt(text, key string) string

AesECBDecrypt ...

func AesECBEncrypt

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

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

PKCS7Padding ...

func PKCS7UnPadding

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

func Sha1(str string) string

Sha1 ...

func Sha256

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