crypto

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package crypto contains cryptographic utilities.

Index

Constants

View Source
const DefaultPSKLength = 32

DefaultPSKLength is the default length of a PSK.

Variables

View Source
var ValidPSKChars = []byte("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")

ValidPSKChars is the set of valid characters for a PSK.

Functions

This section is empty.

Types

type PSK

type PSK []byte

PSK is a pre-shared key.

func GeneratePSK

func GeneratePSK() (PSK, error)

GeneratePSK generates a PSK.

func GeneratePSKWithLength

func GeneratePSKWithLength(length int) (PSK, error)

GeneratePSKWithLength generates a PSK with a given length.

func MustGeneratePSK

func MustGeneratePSK() PSK

MustGeneratePSK generates a PSK and panics on error.

func (PSK) String

func (p PSK) String() string

Jump to

Keyboard shortcuts

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