mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-05 07:50:24 +08:00
init
This commit is contained in:
23
gold/link/crypto.go
Normal file
23
gold/link/crypto.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user