lab2 done
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
Khakimov Dmitrij
2026-10-06 22:38:28 +03:00
parent 47a3cd582d
commit 300ef7714e
74 changed files with 2785 additions and 112 deletions
-9
View File
@@ -2,7 +2,6 @@ package chat
import (
"crypto/hmac"
"crypto/rand"
"crypto/sha256"
"encoding/base64"
"encoding/json"
@@ -24,14 +23,6 @@ type cursorCodec struct {
secret [32]byte
}
func newCursorCodec() cursorCodec {
var codec cursorCodec
if _, err := rand.Read(codec.secret[:]); err != nil {
panic("cannot initialize cursor signing key: " + err.Error())
}
return codec
}
func (c cursorCodec) encode(scope, owner string, createdAt time.Time, id string) string {
payload, err := json.Marshal(cursorPayload{
Scope: scope,