enigma

package
v0.0.0-...-5cd262b Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidCiphertext = errors.New("ciphertext is not valid")
)

Functions

func Derive

func Derive(key, salt, info []byte, size int) ([]byte, error)

func Text

func Text(l int) string

Types

type Enigma

type Enigma struct {
	// contains filtered or unexported fields
}

func NewEnigma

func NewEnigma(secret, salt, info []byte) (*Enigma, error)

func (*Enigma) Decrypt

func (e *Enigma) Decrypt(ciphertext []byte) ([]byte, error)

func (*Enigma) Encrypt

func (e *Enigma) Encrypt(plaintext []byte) []byte

Jump to

Keyboard shortcuts

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