encryption

package
v0.7.10 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	KeyLen = 32
)

Variables

This section is empty.

Functions

func DecodeKey

func DecodeKey(s string) ([]byte, error)

DecodeKey decodes a hex-encoded private or public key.

func GeneratePrivkey

func GeneratePrivkey() ([]byte, error)

GeneratePrivkey generates a private key. The corresponding public key can be derived using PubkeyFromPrivkey.

func NewConfig

func NewConfig() noise.Config

NewConfig instantiates configuration settings that are common to clients and servers.

func PubkeyFromPrivkey

func PubkeyFromPrivkey(privkey []byte) []byte

PubkeyFromPrivkey returns the public key that corresponds to privkey.

func ReadKey

func ReadKey(r io.Reader) ([]byte, error)

ReadKey reads a hex-encoded key from r. r must consist of a single line, with or without a '\n' line terminator. The line must consist of KeyLen hex-encoded bytes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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