Documentation
¶
Index ¶
- func AesDecrypt(str string, key []byte) (ret string, err error)
- func AesDecryptBytes(bytes []byte, key []byte) ([]byte, error)
- func AesEncrypt(str string, key []byte) (string, error)
- func AesEncryptBytes(bytes []byte, key []byte) ([]byte, error)
- func CalcPostId() uint64
- func CalcUserID(email string) uint64
- func CheckPasswordHash(password, hash string) bool
- func DecodeId(str string) (uint64, error)
- func EncodeId(id uint64) string
- func EqString(a interface{}, b string) bool
- func FmtTime(t time.Time) string
- func FmtTimeUnix(unix int64) string
- func FuncMap() template.FuncMap
- func GenRsaKey() (prvkey, pubkey []byte)
- func GetGuid() string
- func GetMd5String(s string) string
- func HashPassword(password string) (string, error)
- func MustUuid() string
- func NewPostId() string
- func NewUuid() (string, error)
- func RandNumberRunes(n int) string
- func RandStringRunes(n int) string
- func RsaDecrypt(ciphertext, keyBytes []byte) ([]byte, error)
- func RsaEncrypt(data, keyBytes []byte) ([]byte, error)
- func RsaSignWithSha256(data []byte, keyBytes []byte) []byte
- func RsaVerySignWithSha256(data, signData, keyBytes []byte) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcPostId ¶
func CalcPostId() uint64
func CalcUserID ¶
func CheckPasswordHash ¶ added in v0.1.1
func FmtTimeUnix ¶
func HashPassword ¶ added in v0.1.1
func RandNumberRunes ¶ added in v0.1.1
func RandStringRunes ¶ added in v0.1.1
func RsaSignWithSha256 ¶ added in v0.1.1
签名
func RsaVerySignWithSha256 ¶ added in v0.1.1
验证
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.