diff --git a/communication/protocol.go b/communication/protocol.go index a3b2dc0..20e33b0 100644 --- a/communication/protocol.go +++ b/communication/protocol.go @@ -3,7 +3,7 @@ package communication import ( "bytes" "crypto/rand" - "encoding/base64" + "encoding/base32" "encoding/gob" "git.qowevisa.me/Qowevisa/gotell/gmyerr" @@ -138,7 +138,7 @@ func (r *RegisteredUser) GenerateLink(count uint16) (Link, error) { if err != nil { return Link{}, err } - encoded := base64.StdEncoding.EncodeToString(buf) + encoded := base32.StdEncoding.EncodeToString(buf) l.Status = LINK_STATUS_CREATED l.Data = []byte(encoded) l.UseCount = count diff --git a/communication/types.go b/communication/types.go index a9eb858..906e20c 100644 --- a/communication/types.go +++ b/communication/types.go @@ -16,7 +16,7 @@ const ( ) const ( - LINK_LEN_V1 = 32 + LINK_LEN_V1 = 8 ) // NOTE: Data should be 32 or 64 bytes