Skip to content

Commit ea6180e

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

2 files changed

Lines changed: 15 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: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ package warp
88

99
import (
1010
crand "crypto/rand"
11+
"crypto/sha256"
12+
"encoding/hex"
1113
"encoding/json"
1214
"errors"
1315
"fmt"
@@ -1568,3 +1570,16 @@ func loge(err error) log.LogFn {
15681570
}
15691571
return log.E
15701572
}
1573+
1574+
func sha(p string) []byte {
1575+
return shab([]byte(p))
1576+
}
1577+
1578+
func shab(b []byte) []byte {
1579+
digest := sha256.Sum256(b)
1580+
return digest[:]
1581+
}
1582+
1583+
func byte2hex(b []byte) string {
1584+
return hex.EncodeToString(b)
1585+
}

0 commit comments

Comments
 (0)