1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-05 07:50:24 +08:00
This commit is contained in:
fumiama
2021-10-24 00:52:13 +08:00
parent e015094337
commit 151da51230
12 changed files with 210 additions and 0 deletions

23
gold/link/crypto.go Normal file
View File

@@ -0,0 +1,23 @@
package link
import "net"
var (
privKey [32]byte
myip string
me net.IP
)
func SetMyself(privateKey [32]byte, myIP string) {
privKey = privateKey
myip = myIP
me = net.ParseIP(myIP)
}
func (id *Identity) Encode(b []byte) (n int, err error) {
return 0, nil
}
func (id *Identity) Decode(b []byte) (n int, err error) {
return 0, nil
}