Added Ed25519 key type
This commit is contained in:
parent
c6d20fd22e
commit
51861455e8
4
main.go
4
main.go
|
@ -11,7 +11,7 @@ import (
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
size := flag.Int("bitsize", 2048, "select the bitsize of the key to generate")
|
size := flag.Int("bitsize", 2048, "select the bitsize of the key to generate")
|
||||||
typ := flag.String("type", "RSA", "select type of key to generate")
|
typ := flag.String("type", "RSA", "select type of key to generate (RSA or Ed25519)")
|
||||||
|
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
@ -19,6 +19,8 @@ func main() {
|
||||||
switch *typ {
|
switch *typ {
|
||||||
case "RSA":
|
case "RSA":
|
||||||
atyp = ci.RSA
|
atyp = ci.RSA
|
||||||
|
case "Ed25519":
|
||||||
|
atyp = ci.Ed25519
|
||||||
default:
|
default:
|
||||||
fmt.Fprintln(os.Stderr, "unrecognized key type: ", *typ)
|
fmt.Fprintln(os.Stderr, "unrecognized key type: ", *typ)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user