aes

package
v1.410.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidLength = errors.New("aes: invalid length")

ErrInvalidLength for aes.

Module for fx.

Functions

func IsEnabled

func IsEnabled(cfg *Config) bool

IsEnabled for aes.

Types

type Cipher added in v1.367.0

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

Cipher for aes.

func NewCipher added in v1.367.0

func NewCipher(gen *rand.Generator, cfg *Config) (*Cipher, error)

NewCipher for aes.

func (*Cipher) Decrypt added in v1.410.0

func (a *Cipher) Decrypt(msg string) (string, error)

func (*Cipher) Encrypt added in v1.410.0

func (a *Cipher) Encrypt(msg string) (string, error)

type Config

type Config struct {
	Key string `yaml:"key,omitempty" json:"key,omitempty" toml:"key,omitempty"`
}

Config for aes.

func (*Config) GetKey

func (c *Config) GetKey() (string, error)

GetKey for aes.

type Generator added in v1.367.0

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

Generator for aes.

func NewGenerator added in v1.367.0

func NewGenerator(gen *rand.Generator) *Generator

NewGenerator for aes.

func (*Generator) Generate added in v1.367.0

func (g *Generator) Generate() (string, error)

Generate for aes.

Jump to

Keyboard shortcuts

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