handoff

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PEMType         = "HANDOFF MESSAGE"
	HeaderReference = "Reference"
	KeySize         = 32
	MaxPlaintext    = 4096
)

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(ciphertextPEM []byte, getKeys func(reference string) (Keys, error)) ([]byte, error)

func Encrypt

func Encrypt(pub [KeySize]byte, reference string, plaintext io.Reader) ([]byte, error)

func ParsePrivKey

func ParsePrivKey(keyB64 string) ([KeySize]byte, error)

func ParsePubKey

func ParsePubKey(keyB64 string) ([KeySize]byte, string, error)

Types

type Keys

type Keys struct {
	Public  string
	Private string
}

func Generate

func Generate(reference string) (Keys, error)

Directories

Path Synopsis
cmd
cli

Jump to

Keyboard shortcuts

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