cryptox

package
v0.0.0-...-8cd3f9c Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2025 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(data []byte, key []byte) ([]byte, error)

AesDecrypt 解密

func AesDecryptBase64

func AesDecryptBase64(data string, key []byte) ([]byte, error)

AesDecryptBase64 base64解码后再 aes解码

func AesEncrypt

func AesEncrypt(data []byte, key []byte) ([]byte, error)

AesEncrypt 加密

func AesEncryptBase64

func AesEncryptBase64(data []byte, key []byte) (string, error)

AesEncryptBase64 aes加密 后 再base64

func CheckPwdHash

func CheckPwdHash(password, hash string) bool

CheckPwdHash 检查密码是否一致

func GenerateRSAKey

func GenerateRSAKey(bits int) (string, string, error)

GenerateRSAKey 生成RSA私钥和公钥字符串 bits 证书大小 @return privateKeyStr publicKeyStr error

func Md5

func Md5(str string) string

Md5 md5

func PwdHash

func PwdHash(password string) string

PwdHash bcrypt加密密码

func RsaDecrypt

func RsaDecrypt(privateKeyStr string, data []byte) ([]byte, error)

RsaDecrypt rsa解密

func RsaEncrypt

func RsaEncrypt(publicKeyStr string, data []byte) ([]byte, error)

RsaEncrypt rsa加密

Types

This section is empty.

Jump to

Keyboard shortcuts

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