Documentation ¶
Index ¶
- func Decrypt(payload []byte, secret string) ([]byte, error)
- func EncodePassword(password string, salt string) (string, error)
- func Encrypt(payload []byte, secret string) ([]byte, error)
- func GetRandomString(n int, alphabets ...byte) (string, error)
- func MD5Sum(s string) string
- func SHA256Sum(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodePassword ¶
EncodePassword encodes a password using PBKDF2.
func GetRandomString ¶
GetRandomString generate random string by specify chars. source: https://github.com/gogits/gogs/blob/9ee80e3e5426821f03a4e99fad34418f5c736413/modules/base/tool.go#L58
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.