summaryrefslogtreecommitdiffstats
path: root/internal/hole/hole.go
diff options
context:
space:
mode:
authorRose Hogenson <rosehogenson@posteo.net>2025-10-07 20:29:09 -0700
committerRose Hogenson <rosehogenson@posteo.net>2025-10-07 20:29:09 -0700
commit40e6f248d4e302c8541d72778de64b5bdde2b69c (patch)
tree7187d86f922af555c765059b36eacfa4e874213a /internal/hole/hole.go
parentLog (diff)
downloadroseh.moe-40e6f248d4e302c8541d72778de64b5bdde2b69c.tar.zst
Use ini for the secrets file as well
Diffstat (limited to 'internal/hole/hole.go')
-rw-r--r--internal/hole/hole.go25
1 files changed, 0 insertions, 25 deletions
diff --git a/internal/hole/hole.go b/internal/hole/hole.go
deleted file mode 100644
index 4824459..0000000
--- a/internal/hole/hole.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package hole
-
-import (
- "crypto/rand"
- _ "embed"
- "encoding/binary"
- "strings"
-)
-
-var (
- //go:embed wordlist.txt
- wordListString string
- wordList = strings.Split(strings.TrimSuffix(wordListString, "\n"), "\n")
-)
-
-func New() string {
- const nWords = 10
- buf := make([]byte, 2*nWords)
- rand.Read(buf)
- words := make([]string, nWords)
- for i := range words {
- words[i] = wordList[binary.NativeEndian.Uint16(buf[2*i:])&0x1fff]
- }
- return strings.Join(words, "-")
-}