]> Cypherpunks.ru repositories - govpn.git/blobdiff - src/cypherpunks.ru/govpn/identify.go
Base64 peer identifiers, not hex, as they are used in verifiers
[govpn.git] / src / cypherpunks.ru / govpn / identify.go
index ed55e0dce6148b540878bf502b821b88d848cd9c..0583921e668c0a604650abaaed45ccef708405e2 100644 (file)
@@ -20,7 +20,7 @@ package govpn
 
 import (
        "crypto/subtle"
-       "encoding/hex"
+       "encoding/base64"
        "log"
        "sync"
 
@@ -34,7 +34,7 @@ const (
 type PeerId [IDSize]byte
 
 func (id PeerId) String() string {
-       return hex.EncodeToString(id[:])
+       return base64.RawStdEncoding.EncodeToString(id[:])
 }
 
 func (id PeerId) MarshalJSON() ([]byte, error) {