From: Sergey Matveev Date: Fri, 29 Jan 2016 21:30:27 +0000 (+0300) Subject: Base64 peer identifiers, not hex, as they are used in verifiers X-Git-Tag: 5.4^2~4 X-Git-Url: http://www.git.cypherpunks.ru/?p=govpn.git;a=commitdiff_plain;h=d45dbf3033f363b632c19de05c6826ae9f71e9aa Base64 peer identifiers, not hex, as they are used in verifiers Signed-off-by: Sergey Matveev --- 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) {