README ¶ encryption Installation go get github.com/go-packagist/encryption Usage package main import ( "fmt" "github.com/go-packagist/encryption" ) func main() { e := encryption.NewEncrypter("EAFBSPAXDCIOGRUVNERQGXPYGPNKYATM") ciphertext, _ := e.Encrypt("test") plaintext, _ := e.Decrypt(ciphertext) fmt.Println(plaintext, ciphertext) // test 94Wpr_RCTTnDKw8u_zaqTsL8rr4= } License The MIT License (MIT). Please see License File for more information. Expand ▾ Collapse ▴ Documentation ¶ Index ¶ type Encrypter func NewEncrypter(key string) *Encrypter func (e *Encrypter) Decrypt(value string) (string, error) func (e *Encrypter) Encrypt(value string) (string, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Encrypter ¶ type Encrypter struct { // contains filtered or unexported fields } func NewEncrypter ¶ func NewEncrypter(key string) *Encrypter func (*Encrypter) Decrypt ¶ func (e *Encrypter) Decrypt(value string) (string, error) func (*Encrypter) Encrypt ¶ func (e *Encrypter) Encrypt(value string) (string, error) Source Files ¶ View all Source files encrypter.go Click to show internal directories. Click to hide internal directories.