Skip to content

Commit 1269404

Browse files
committed
lint: rmv unused edkey.go
1 parent 0d41d39 commit 1269404

2 files changed

Lines changed: 10 additions & 139 deletions

File tree

intra/ipn/warp/edkey.go

Lines changed: 0 additions & 139 deletions
This file was deleted.

intra/ipn/warp/yegor.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ package warp
88

99
import (
1010
crand "crypto/rand"
11+
"crypto/sha256"
1112
"encoding/json"
1213
"errors"
1314
"fmt"
@@ -736,6 +737,15 @@ func (a *WsClient) Who() *x.Gostr {
736737
return x.StrOf(status + ":" + c.Session.UserID + "+" + trunc8(byte2hex(sha(c.Session.SessionToken))) + "@" + a.kid())
737738
}
738739

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+
739749
// ProviderID implements RpnAcc.
740750
func (*WsClient) ProviderID() string { return x.RpnWin }
741751

0 commit comments

Comments
 (0)