Documentation
¶
Index ¶
- func BcryptHash(password string) (string, error)
- func BcryptVerify(password, hashedPassword string) bool
- func Des3Decrypt(s, p string) (string, error)
- func Des3Encrypt(s, p string) (string, error)
- func FileMD5sum(path string) (string, error)
- func IsBcrypt(password string) bool
- func MD5sum(s string) string
- func NewSSHKeypair() (string, string, error)
- func NewSSHPublicKey(privatekey *rsa.PublicKey) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BcryptHash ¶ added in v0.14.1
BcryptHash 使用 bcrypt 对密码进行哈希
func BcryptVerify ¶ added in v0.14.1
BcryptVerify 验证密码是否匹配存储的哈希值
func Des3Decrypt ¶
Des3Decrypt 使用 DES3-CBC 解密字符串 参数 s: 加密后的十六进制字符串, p: 密钥
func Des3Encrypt ¶
Des3Encrypt 使用 DES3-CBC 加密字符串 参数 s: 待加密字符串, p: 密钥
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.