From d45dbf3033f363b632c19de05c6826ae9f71e9aa Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sat, 30 Jan 2016 00:30:27 +0300 Subject: [PATCH] Base64 peer identifiers, not hex, as they are used in verifiers Signed-off-by: Sergey Matveev --- src/cypherpunks.ru/govpn/identify.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cypherpunks.ru/govpn/identify.go b/src/cypherpunks.ru/govpn/identify.go index ed55e0d..0583921 100644 --- a/src/cypherpunks.ru/govpn/identify.go +++ b/src/cypherpunks.ru/govpn/identify.go @@ -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) { -- 2.44.0