secrets

package
v0.0.0-...-05bc493 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyPair

type KeyPair struct {
	Private crypto.PrivateKey
	Public  crypto.PublicKey
}

KeyPair holds private/public keys pair.

func GenerateKeyPair

func GenerateKeyPair() (*KeyPair, error)

GenerateKeyPair generates private/public keys pair. It uses default platform policy.

func ReadKeys

func ReadKeys(r io.Reader, publicOnly bool) (*KeyPair, error)

ReadKeysFile reads and parses json from reader, returns parsed private/public keys pair.

func ReadKeysFile

func ReadKeysFile(file string, publicOnly bool) (*KeyPair, error)

ReadKeysFile reads private/public keys pair from json file.

func ReadKeysFromDir

func ReadKeysFromDir(dir string) ([]*KeyPair, error)

ReadKeysFromDir reads directory, tries to parse every file in it as json with private/public keys pair returns list of parsed private/public keys pairs.

Jump to

Keyboard shortcuts

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