rsakit

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatKey

func FormatKey(key string) (string, error)

func ParseIntoAuthorizedKeyBuf

func ParseIntoAuthorizedKeyBuf(publicKey *ecdsa.PublicKey) (*ssh.PublicKey, *bytes.Buffer)

func ParseIntoPrivateKeyBuf

func ParseIntoPrivateKeyBuf(privateKey *ecdsa.PrivateKey) *bytes.Buffer

func ParseIntoPublicKeyBuf

func ParseIntoPublicKeyBuf(publicKey *ecdsa.PublicKey) *bytes.Buffer

func ParsePrivateKey

func ParsePrivateKey(privateKey string) *ecdsa.PrivateKey

func ParsePublicKey

func ParsePublicKey(publicKey string) *ecdsa.PublicKey

///////////////////

Types

type RSAKey

type RSAKey struct {
	PrivateKey       *ecdsa.PrivateKey
	PrivateKeyBuff   *bytes.Buffer
	PrivateKeyText   string
	PrivateKeyBase64 string

	PublicKey       *ecdsa.PublicKey
	PublicKeyBuff   *bytes.Buffer
	PublicKeyText   string
	PublicKeyBase64 string

	AuthorizedKey       *ssh.PublicKey
	AuthorizedKeyBuff   *bytes.Buffer
	AuthorizedKeyText   string
	AuthorizedKeyBase64 string
}

func GenerateDSAKeyPair

func GenerateDSAKeyPair(bits int) RSAKey

Jump to

Keyboard shortcuts

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