sophuwu.site > seks
module rename
sophuwu sophie@skisiel.com
Tue, 04 Jun 2024 08:21:01 +0200
commit

3a451bbe2a9f88d41972d9f3be0567a0a33664c9

parent

41b4c582b1739d6adc3841f532fc66972d0327cb

4 files changed, 8 insertions(+), 16 deletions(-)

jump to
M .gitignore.gitignore

@@ -1,3 +1,2 @@

.idea build -seks
M encoding/encoding.goencoding/encoding.go

@@ -1,4 +1,4 @@

-package encoding +package git.sophuwu.site/seks/encoding import ( "fmt"

@@ -26,7 +26,7 @@ func UnArmour(s string) ([]byte, error) {

begin := strings.Index(s, seksHeader) end := strings.Index(s, seksFooter) if begin < 0 || end < 0 { - return nil, fmt.Errorf("sopHex UnMarshall: invalid seks secret") + return nil, fmt.Errorf("SEKS UnMarshall: invalid seks secret") } s = s[begin+len(seksHeader) : end] s = strings.ReplaceAll(s, "\t", "")

@@ -39,7 +39,7 @@ var n int

for i, v := range s { n = index(v) if n == -1 { - return nil, fmt.Errorf("sopHex UnMarshall: invalid character %q at index %d", v, i) + return nil, fmt.Errorf("SEKS UnMarshall: invalid character %q at index %d", v, i) } if i%2 == 0 { b = append(b, byte(n<<4))
M go.modgo.mod

@@ -1,4 +1,4 @@

-module sophuwu.site/seks.git +module git.sophuwu.site/seks go 1.21.3
M main.goseks.go

@@ -1,17 +1,9 @@

-/* - * SEKS: Some Encryption Key Stuff - */ -package seks +package git.sophuwu.site/seks import ( - "bytes" "crypto/rand" "crypto/sha256" - "fmt" "golang.org/x/crypto/nacl/secretbox" - "golang.org/x/term" - "os" - "syscall" ) func ran() []byte {

@@ -40,7 +32,7 @@ var key [32]byte

copy(key[:], hash.Sum(nil)) return key } - +/* func main() { // NaCl crypto_box symmetric encryption // Make a bbolt database

@@ -93,4 +85,5 @@ }

fmt.Printf("-----Result-----\n") fmt.Println(result) -}+} + */