module rename
sophuwu sophie@skisiel.com
Tue, 04 Jun 2024 08:21:01 +0200
4 files changed,
8 insertions(+),
16 deletions(-)
M
encoding/encoding.go
→
encoding/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
main.go
→
seks.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) -}+} + */