utils

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCipherNotSupported = errors.New("cipher not supported")
View Source
var SupportedMethods = map[string]struct {
	meta core.MetaCipher
	New  func(meta core.MetaCipher, password string) (core.ShadowCipher, error)
}{
	"chacha20-ietf-poly1305": {

		New: shadowaead.Chacha20Poly1305,
		// contains filtered or unexported fields
	},
	"aes-256-gcm": {

		New: shadowaead.AESGCM,
		// contains filtered or unexported fields
	},
	"aes-128-gcm": {

		New: shadowaead.AESGCM,
		// contains filtered or unexported fields
	},
	"2022-blake3-aes-128-gcm": {

		New: shadowaead2022.AESGCM,
		// contains filtered or unexported fields
	},
	"2022-blake3-aes-256-gcm": {

		New: shadowaead2022.AESGCM,
		// contains filtered or unexported fields
	},
}

Functions

func GeneratePadding deprecated

func GeneratePadding() (int, []byte, error)

Deprecated: when caller send first packet, the padding and initialPayload will be filled

func ListCipher

func ListCipher() []string

func NewClientConfig

func NewClientConfig(method, password string) (core.ClientConfig, error)

func NewServerConfig

func NewServerConfig(method, password string, users []core.UserConfig) (core.ServerConfig, error)

func PickCipher

func PickCipher(name string, password string) (core.ShadowCipher, error)

PickCipher returns a Cipher of the given name. Derive key from password

Types

This section is empty.

Jump to

Keyboard shortcuts

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