diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2019-07-07 21:33:44 +0100 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2019-07-07 21:33:44 +0100 |
commit | 8c12c6939aab9106db14ec2d11d983bc5b29fb2c (patch) | |
tree | f9dc8a7d167c6355e47a65c52d4eb7b9ea03e6c8 /vendor/github.com/mikesmitty/edkey/README.md | |
parent | 0bd454cc448b812da6c693b451d86ff4cadbb6b2 (diff) |
Switch to modules
Diffstat (limited to 'vendor/github.com/mikesmitty/edkey/README.md')
-rw-r--r-- | vendor/github.com/mikesmitty/edkey/README.md | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/vendor/github.com/mikesmitty/edkey/README.md b/vendor/github.com/mikesmitty/edkey/README.md deleted file mode 100644 index a1690ae..0000000 --- a/vendor/github.com/mikesmitty/edkey/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# edkey -edkey allows you to marshal/write ED25519 private keys in the OpenSSH private key format - -## Example -```go -package main - -import ( - "crypto/rand" - "encoding/pem" - "io/ioutil" - "github.com/mikesmitty/edkey" - "golang.org/x/crypto/ed25519" - "golang.org/x/crypto/ssh" -) - -func main() { - // Generate a new private/public keypair for OpenSSH - pubKey, privKey, _ := ed25519.GenerateKey(rand.Reader) - publicKey, _ := ssh.NewPublicKey(pubKey) - - pemKey := &pem.Block{ - Type: "OPENSSH PRIVATE KEY", - Bytes: edkey.MarshalED25519PrivateKey(privKey), - } - privateKey := pem.EncodeToMemory(pemKey) - authorizedKey := ssh.MarshalAuthorizedKey(publicKey) - - _ = ioutil.WriteFile("id_ed25519", privateKey, 0600) - _ = ioutil.WriteFile("id_ed25519.pub", authorizedKey, 0644) -} -``` |