moved a lot

This commit is contained in:
vfs committed 2026-05-09 14:40:14 +02:00
1 parent 5772a7d855
commit 136a1c34b3
98 files changed
+6950 -2183

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
package crypto
import (
"crypto/sha256"
"encoding/binary"
)
func VoteMessage(issueID, optionID int64, nonce []byte) [32]byte {
buf := make([]byte, 16+len(nonce))
binary.BigEndian.PutUint64(buf[0:8], uint64(issueID))
binary.BigEndian.PutUint64(buf[8:16], uint64(optionID))
copy(buf[16:], nonce)
return sha256.Sum256(buf)
}