OTP support
This commit is contained in:
9
utils.go
9
utils.go
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"math/big"
|
||||
"net"
|
||||
"sort"
|
||||
@@ -8,6 +9,14 @@ import (
|
||||
"github.com/pyke369/golang-support/uconfig"
|
||||
)
|
||||
|
||||
func B64decode(s string) string {
|
||||
data, err := base64.StdEncoding.DecodeString(s)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
return string(data)
|
||||
}
|
||||
|
||||
// check if there is a member of "search" in "list". sort list to be more
|
||||
// efficiant. adapt with sorting "search" too
|
||||
func inArray(search, list []string) bool {
|
||||
|
||||
Reference in New Issue
Block a user