aboutsummaryrefslogtreecommitdiff
path: root/lib/play/request.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/play/request.go')
-rw-r--r--lib/play/request.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/play/request.go b/lib/play/request.go
index c38e9674..8d4ae82f 100644
--- a/lib/play/request.go
+++ b/lib/play/request.go
@@ -6,14 +6,13 @@ package play
import (
"crypto/sha256"
+ "encoding/binary"
"encoding/hex"
"fmt"
"net/http"
"os"
"path/filepath"
"strings"
-
- libbytes "git.sr.ht/~shulhan/pakakeh.go/lib/bytes"
)
const cookieNameSid = `sid`
@@ -79,7 +78,7 @@ func (req *Request) generateSid() string {
var plain = []byte(req.Body)
var epoch = now()
- plain = libbytes.AppendInt64(plain, epoch)
+ plain = binary.BigEndian.AppendUint64(plain, uint64(epoch))
var cipher = sha256.Sum256(plain)
var dst = make([]byte, hex.EncodedLen(len(cipher)))
hex.Encode(dst, cipher[:])