kefu/tools/hashids_test.go

16 lines
227 B
Go
Raw Permalink Normal View History

2024-12-10 02:50:12 +00:00
package tools
import (
"testing"
"time"
)
func TestHashIds(t *testing.T) {
salt := "xxx"
id := time.Now().Unix()
hash, err := HashIds(salt, id)
t.Log(hash, err)
ids, err := HashIdsDecode(salt, hash)
t.Log(ids, err)
}