key

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: BSD-2-Clause Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParsePrivateKey

func ParsePrivateKey(ascii string) (crypto.Signer, error)

Supports two formats:

  • Openssh private key
  • Openssh public key, in which case ssh-agent is used to access the corresponding private key.
  • (Deprecated) Raw hex-encoded private key (RFC 8032)

func ParsePublicKey

func ParsePublicKey(ascii string) (crypto.PublicKey, error)

Expects an Openssh public key (single-line format)

func ReadPrivateKeyFile added in v0.1.19

func ReadPrivateKeyFile(fileName string) (crypto.Signer, error)

func ReadPublicKeyFile added in v0.1.19

func ReadPublicKeyFile(fileName string) (crypto.PublicKey, error)

func ReadPublicKeysFile added in v0.8.1

func ReadPublicKeysFile(fileName string) (map[crypto.Hash]crypto.PublicKey, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL