mirror of
https://gitee.com/samwaf/SamWaf.git
synced 2025-12-06 06:58:54 +08:00
15 lines
265 B
Go
15 lines
265 B
Go
package utils
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
func TestGenOtpSecret(t *testing.T) {
|
|
secret, url, err := GenOtpSecret("admin")
|
|
fmt.Println(secret, url, err)
|
|
}
|
|
func TestValidateOtpCode(t *testing.T) {
|
|
ValidateOtpCode("937792", "MZTAH2NZ6AWGEPGMWOUETPQ6275TAMGX")
|
|
}
|