secrets

package
v0.9.15 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPublicKeyFromFile

func GetPublicKeyFromFile(file string) (string, error)

GetPublicKeyFromFile reads private/public keys pair from json file and return public key

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) (*KeyPair, error)

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

func ReadKeysFile

func ReadKeysFile(file string) (*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