1
This commit is contained in:
parent
81e5f65f46
commit
baebc1dff0
@ -1,12 +1,9 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
"q5"
|
||||
"time"
|
||||
. "main/global"
|
||||
)
|
||||
|
||||
type MetaMaskApi struct {
|
||||
@ -21,9 +18,7 @@ func (this *MetaMaskApi) GetNonce(c *gin.Context) {
|
||||
})
|
||||
return
|
||||
}
|
||||
timeUnixNano := time.Now().UnixNano()
|
||||
sum := md5.Sum([]byte(account + "_" + q5.ToString(timeUnixNano)))
|
||||
nonce := hex.EncodeToString(sum[:])
|
||||
nonce := GetSessionMgr().GenNonce()
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"code": 0,
|
||||
"message": "success",
|
||||
|
Loading…
x
Reference in New Issue
Block a user