← 返回首页
gitsshkey package - github.com/coder/coder/coderd/gitsshkey - Go Packages
  1. Discover Packages
  2. github.com/coder/coder
  3. coderd
  4. gitsshkey

gitsshkey

package
v0.27.3 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2023 License: AGPL-3.0 Imports: 18 Imported by: 0
Main Versions Licenses Imports Imported By

Details

Repository

Links

Jump to ...
Documentation

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(algo Algorithm) (privateKey string, publicKey string, err error)

Generate creates a private key in the OpenSSH PEM format and public key in the authorized key format.

func MarshalED25519PrivateKey

func MarshalED25519PrivateKey(key ed25519.PrivateKey) ([]byte, error)

Types

type Algorithm

type Algorithm string
const ( // AlgorithmEd25519 is the Edwards-curve Digital Signature Algorithm using Curve25519 AlgorithmEd25519 Algorithm = "ed25519" // AlgorithmECDSA is the Digital Signature Algorithm (DSA) using NIST Elliptic Curve AlgorithmECDSA Algorithm = "ecdsa" // AlgorithmRSA4096 is the venerable Rivest-Shamir-Adleman algorithm // and creates a key with a fixed size of 4096-bit. AlgorithmRSA4096 Algorithm = "rsa4096" )

func ParseAlgorithm

func ParseAlgorithm(t string) (Algorithm, error)

ParseAlgorithm returns a valid Algorithm or error if input is not a valid.

Jump to

Close

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
Close
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic. Learn more.
Okay