🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.privacy.anon-server
1 messages
1 total messages Started by Yamn Remailer Fri, 09 Feb 2024 18:17
random Cancel-Locks
#324262
Author: Yamn Remailer
Date: Fri, 09 Feb 2024 18:17
30 lines
3503 bytes
Maybe useful, for some of you.

// rcanlock.go - create random Cancel-Locks

package main

import (
	"crypto/rand"
	"crypto/sha1"
	"encoding/base64"
	"fmt"
)

func generateRandomCancelLock() string {
	randomData := make([]byte, 32)
	_, err := rand.Read(randomData)
	if err != nil {
		panic(err)
	}

	h := sha1.New()
	h.Write(randomData)

	return base64.StdEncoding.EncodeToString(h.Sum(nil))
}

func main() {
	lock := generateRandomCancelLock()
	fmt.Printf("Cancel-Lock: sha1:%s\n", lock)
}
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads