Changes in encoding
This commit is contained in:
parent
99dbc74775
commit
8482b07eed
|
@ -3,7 +3,7 @@ package communication
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"encoding/base64"
|
"encoding/base32"
|
||||||
"encoding/gob"
|
"encoding/gob"
|
||||||
|
|
||||||
"git.qowevisa.me/Qowevisa/gotell/gmyerr"
|
"git.qowevisa.me/Qowevisa/gotell/gmyerr"
|
||||||
|
@ -138,7 +138,7 @@ func (r *RegisteredUser) GenerateLink(count uint16) (Link, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return Link{}, err
|
return Link{}, err
|
||||||
}
|
}
|
||||||
encoded := base64.StdEncoding.EncodeToString(buf)
|
encoded := base32.StdEncoding.EncodeToString(buf)
|
||||||
l.Status = LINK_STATUS_CREATED
|
l.Status = LINK_STATUS_CREATED
|
||||||
l.Data = []byte(encoded)
|
l.Data = []byte(encoded)
|
||||||
l.UseCount = count
|
l.UseCount = count
|
||||||
|
|
|
@ -16,7 +16,7 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
LINK_LEN_V1 = 32
|
LINK_LEN_V1 = 8
|
||||||
)
|
)
|
||||||
|
|
||||||
// NOTE: Data should be 32 or 64 bytes
|
// NOTE: Data should be 32 or 64 bytes
|
||||||
|
|
Loading…
Reference in New Issue
Block a user