good morning!!!!

Skip to content
Snippets Groups Projects
Commit 46052f92 authored by or-else's avatar or-else
Browse files

remove inconsistency between keygen and tinode.conf

parent 9512c58f
No related branches found
No related tags found
No related merge requests found
......@@ -64,7 +64,6 @@ func generate(sequence, isRoot int, hmacSaltB64 string) int {
log.Println("Failed to generate HMAC salt", err)
return 1
}
hmacSaltB64 = base64.URLEncoding.EncodeToString(hmacSalt)
} else {
var err error
hmacSalt, err = base64.URLEncoding.DecodeString(hmacSaltB64)
......@@ -77,6 +76,8 @@ func generate(sequence, isRoot int, hmacSaltB64 string) int {
return 1
}
}
// Make sure the salt is base64std encoded: tinode.conf requires std encoding.
hmacSaltB64 = base64.StdEncoding.EncodeToString(hmacSalt)
// [1:algorithm version][4:appid][2:key sequence][1:isRoot]
data[0] = 1 // default algorithm
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment