aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/gitolfs3-gen-ed25519-key
diff options
context:
space:
mode:
authorLibravatar Rutger Broekhoff2024-01-24 18:58:58 +0100
committerLibravatar Rutger Broekhoff2024-01-24 18:58:58 +0100
commit6095ead99248963ae70091c5bb3399eed49c0826 (patch)
treee6a1f57f4b9434d77364f2d15bdae1a44a14e00d /cmd/gitolfs3-gen-ed25519-key
parentf41e9cc4fc2c91ef710c6976ca4554840dde22e5 (diff)
downloadgitolfs3-6095ead99248963ae70091c5bb3399eed49c0826.tar.gz
gitolfs3-6095ead99248963ae70091c5bb3399eed49c0826.zip
Remove Go and C source
The Rust implementation now implements all features I need
Diffstat (limited to 'cmd/gitolfs3-gen-ed25519-key')
-rw-r--r--cmd/gitolfs3-gen-ed25519-key/main.go31
1 files changed, 0 insertions, 31 deletions
diff --git a/cmd/gitolfs3-gen-ed25519-key/main.go b/cmd/gitolfs3-gen-ed25519-key/main.go
deleted file mode 100644
index 8288fd1..0000000
--- a/cmd/gitolfs3-gen-ed25519-key/main.go
+++ /dev/null
@@ -1,31 +0,0 @@
1package main
2
3import (
4 "crypto/ed25519"
5 "crypto/rand"
6 "encoding/hex"
7 "fmt"
8 "os"
9)
10
11func wipe(b []byte) {
12 for i := range b {
13 b[i] = 0
14 }
15}
16
17func main() {
18 publicKey, privateKey, err := ed25519.GenerateKey(rand.Reader)
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Failed to generate ED25519 key: %s", err)
21 os.Exit(1)
22 }
23 defer wipe(privateKey)
24
25 enc := hex.NewEncoder(os.Stdout)
26 print("Public ")
27 enc.Write(publicKey)
28 print("\nPrivate ")
29 enc.Write(privateKey.Seed())
30 println()
31}