16 lines
227 B
Go
16 lines
227 B
Go
|
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)
|
||
|
}
|