keys

package
v0.0.0-...-7c24afe Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: Zlib Imports: 4 Imported by: 0

Documentation

Overview

Package keys contains functions to manipulate dnsconn keys.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(k string) (*[32]byte, error)

Decode decodes the base64 representation of a key. It is the inverse of Encode.

func Encode

func Encode(k *[32]byte) string

Encode returns the base64 representation of a key. It is the inverse of Decode.

func GenerateKeypair

func GenerateKeypair() (publicKey, privateKey *[32]byte, err error)

GeneratePair generates a keypair. It is a wrapper around golang.org/x/crypto/nacl/box.GenerateKey.

func MustDecode

func MustDecode(h string) *[32]byte

MustDecode is like Decode but panics on error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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