crypt

package
v1.0.1001 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(decryptStr string, key []byte, iv string) (string, error)

Decrypt 解密

func AesEncrypt

func AesEncrypt(encryptStr string, key []byte, iv string) (string, error)

Encrypt 加密 aes_128_cbc

func BcryptCheck

func BcryptCheck(password, hash string) bool

对比明文密码和数据库的哈希值

func BcryptHash

func BcryptHash(password string) string

使用 bcrypt 对密码进行加密

func Hmac

func Hmac(secretKey, body string) string

hmac

func MD5

func MD5(s string) string

MD5 哈希值

func RsaPrivateDecrypt

func RsaPrivateDecrypt(decryptStr string, privateKeyPath string) (string, error)

PrivateDecrypt 私钥解密

func RsaPublicEncrypt

func RsaPublicEncrypt(encryptStr string, publicKeyPath string) (string, error)

PublicEncrypt 公钥加密

func SHA1

func SHA1(s string) string

SHA1 哈希值

Types

This section is empty.

Jump to

Keyboard shortcuts

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