Changes in encoding

This commit is contained in:
qowevisa 2024-06-08 21:58:51 +03:00
parent 99dbc74775
commit 8482b07eed
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -16,7 +16,7 @@ const (
)
const (
LINK_LEN_V1 = 32
LINK_LEN_V1 = 8
)
// NOTE: Data should be 32 or 64 bytes