すべてのオプション
bookworm  ] [  trixie  ] [  sid  ]
[ ソース: golang-github-mikesmitty-edkey  ]

パッケージ: golang-github-mikesmitty-edkey-dev (0.0~git20170222.3356ea4-2)

golang-github-mikesmitty-edkey-dev に関するリンク

Screenshot

Debian の資源:

golang-github-mikesmitty-edkey ソースパッケージをダウンロード:

メンテナ:

外部の資源:

類似のパッケージ:

generates ED25519 private keys in the OpenSSH private key format (Go library)

Go package edkey allows you to marshal/write ED25519 private keys in the OpenSSH private key format.

Example:

  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)
  }

その他の golang-github-mikesmitty-edkey-dev 関連パッケージ

  • 依存
  • 推奨
  • 提案
  • enhances

golang-github-mikesmitty-edkey-dev のダウンロード

すべての利用可能アーキテクチャ向けのダウンロード
アーキテクチャ パッケージサイズ インストールサイズ ファイル
all 4.2 kB18.0 kB [ファイル一覧]