We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d41d39 commit 1269404Copy full SHA for 1269404
2 files changed
intra/ipn/warp/edkey.go
intra/ipn/warp/yegor.go
@@ -8,6 +8,7 @@ package warp
8
9
import (
10
crand "crypto/rand"
11
+ "crypto/sha256"
12
"encoding/json"
13
"errors"
14
"fmt"
@@ -736,6 +737,15 @@ func (a *WsClient) Who() *x.Gostr {
736
737
return x.StrOf(status + ":" + c.Session.UserID + "+" + trunc8(byte2hex(sha(c.Session.SessionToken))) + "@" + a.kid())
738
}
739
740
+func sha(p string) []byte {
741
+ return shab([]byte(p))
742
+}
743
+
744
+func shab(b []byte) []byte {
745
+ digest := sha256.Sum256(b)
746
+ return digest[:]
747
748
749
// ProviderID implements RpnAcc.
750
func (*WsClient) ProviderID() string { return x.RpnWin }
751
0 commit comments