crypto

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SimpleSymmetricCryptoRelay

type SimpleSymmetricCryptoRelay struct {
	relay.R

	Mode     string // Mode encrypt/decrypt
	Password string // Password is hardcoded in the config.
	EnvVar   string // EnvVar overrides Password with an environment variable.
	// contains filtered or unexported fields
}

SimpleSymmetricCryptoRelay is a reference implementation of encryption in the relay flow. Note that I am not a cryptographer and at the time of writing these methods / techniques have not been verified as safe. They have been copied from the golang AES tests at

https://golang.org/src/crypto/cipher/example_test.go

and while they might be assumed to be safe, the author(s) do not guarantee safety. Your millage may vary.

func (SimpleSymmetricCryptoRelay) ID

ID returns a human readable identifier for this thing.

func (SimpleSymmetricCryptoRelay) RDo

func (r SimpleSymmetricCryptoRelay) RDo(ctx context.Context, outbound <-chan []events.Event, inbound chan<- []events.Event) error

RDo will pass messages through an intermediary that may perform operations on the data.

Jump to

Keyboard shortcuts

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