hash

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// 时间格式化字符串
	SysTimeform      string = "2006-01-02 15:04:05"
	SysTimeformShort string = "2006-01-02"
)

前面是含义,后面是 go 的表示值,多种表示,逗号","分割 年  06,2006 月份 1,01,Jan,January 日  2,02,_2 时  3,03,15,PM,pm,AM,am 分  4,04 秒  5,05 周几 Mon,Monday 时区时差表示 -07,-0700,Z0700,Z07:00,-07:00,MST 时区字母缩写 MST 您看出规律了么!哦是的,你发现了,这里面没有一个是重复的,所有的值表示都唯一对应一个时间部分。 并且涵盖了很多格式组合。

Variables

View Source
var SysTimeLocation, _ = time.LoadLocation("Asia/Chongqing")

中国时区

Functions

func AESDecrypt

func AESDecrypt(baseStr string) string

----------------------------------------------------------- ----------------------- 解密 ------------------------------ ----------------------------------------------------------- 先base64转码,再解密

func AESDecrypt2

func AESDecrypt2(cipherkey, ciphertext []byte) ([]byte, error)

AESDecrypt decrypts a piece of data. The cipherkey argument should be the AES key, either 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256.

func AESEncrypt

func AESEncrypt(originPWD []byte) string

----------------------------------------------------------- ----------------------- 加密 ------------------------------ ----------------------------------------------------------- 加密后再base64编码成string

func AESEncrypt2

func AESEncrypt2(cipherkey, src []byte) []byte

AESEncrypt encrypts a piece of data. The cipherkey argument should be the AES key, either 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256.

func CheckPWD

func CheckPWD(password, enPassword string) bool

校验密码

func FmtRolePrefix

func FmtRolePrefix(sub interface{}) string

func Md5

func Md5(b []byte) string

Md5 returns the MD5 checksum string of the data.

func Ripemd160

func Ripemd160(bytes []byte) []byte

func Sha256

func Sha256(bytes []byte) []byte

func StampToTime

func StampToTime(st int64) time.Time

timestamp to time

func XXHash

func XXHash(bytes []byte) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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