package crypter
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
func Test_AuthCodeDec(t *testing.T) {
|
|
str := "18175"
|
|
key := "1509930887"
|
|
isencode := true
|
|
|
|
ret := AuthCode(str, key, isencode)
|
|
fmt.Println(str, "加密结果 ret:", ret)
|
|
|
|
}
|
|
|
|
func Test_AuthCodeEnc(t *testing.T) {
|
|
str := "1fa9Vsp7e91Pg9z8xorzO55lSbLcHZbNt9z10K8d7TEZZg"
|
|
key := "1509930887"
|
|
isencode := false
|
|
|
|
ret := AuthCode(str, key, isencode)
|
|
fmt.Println(str, "解密结果 ret:", ret)
|
|
}
|