cryptil

package
v0.0.0-...-749b2f0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(value, secret string) (decrypt string)

对称加密与解密之解密【从Beego中提取出来的】 @param value 需要解密的字符串 @param secret 密钥 @return decrypt 返回解密后的字符串

func Encrypt

func Encrypt(value, secret string) (encrypt string)

对称加密与解密之加密【从Beego中提取出来的】 @param value 需要加密的字符串 @param secret 加密密钥 @return encrypt 返回的加密后的字符串

func Md5Crypt

func Md5Crypt(str string, salt ...interface{}) (CryptStr string)

MD5加密 @param str 需要加密的字符串 @param salt 盐值 @return CryptStr 加密后返回的字符串

func NewRandChars

func NewRandChars(length int) string

生成指定长度的字符串.

func Sha1Crypt

func Sha1Crypt(str string, salt ...interface{}) (CryptStr string)

SHA1加密 @param str 需要加密的字符串 @param salt 盐值 @return CryptStr 加密后返回的字符串

func UniqueId

func UniqueId() string

生成Guid字串

Types

This section is empty.

Jump to

Keyboard shortcuts

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