diff options
Diffstat (limited to 'server/main.go')
-rw-r--r-- | server/main.go | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/server/main.go b/server/main.go index c0f7450..3ad3060 100644 --- a/server/main.go +++ b/server/main.go @@ -12,6 +12,7 @@ import ( type user struct { pubkey []byte + servers []string } var mu sync.Mutex @@ -20,22 +21,7 @@ var myHash string var myPos int var hashToDomain map[string]string var peerHashes []string -var kvstore map[string]string - -// Get the sha256sum of string as a URL-safe unpadded base64 string -func sha256sum(s string) string { - b := sha256.Sum256([]byte(s)) - return base64.RawURLEncoding.EncodeToString(b[:]) -} - -// Decode an ID to a public key -func asPubKey(s string) ed25519.PublicKey { - b, err := base64.RawURLEncoding.DecodeString(s) - if err != nil { - return nil - } - return ed25519.PublicKey(b) -} +var kvstore map[string][]byte func main() { bindAddr := flag.String("b", ":4200", "bind address") |