crypter

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidAESKeyLength = errors.New("Invalid key length")

ErrInvalidAESKeyLength is the error returned when the encryption key isn't the correct length

Functions

This section is empty.

Types

type Crypter

type Crypter interface {
	Encrypt(data string) (string, error)
	Decrypt(ciphertext string) (string, error)
}

Crypter defines the interface for various encryption tools

func NewAESCrypter

func NewAESCrypter(key []byte) (Crypter, error)

NewAESCrypter initializes a new Crypter

Jump to

Keyboard shortcuts

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