Documentation ¶ Index ¶ type Crypto func NewCrypto(method Method, key string) (*Crypto, error) func (c *Crypto) Decrypt(in []byte) ([]byte, error) func (c *Crypto) Encrypt(in []byte) ([]byte, error) func (c *Crypto) Method() Method type Method func (m Method) ToString() string Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Crypto ¶ added in v0.8.0 type Crypto struct { // contains filtered or unexported fields } func NewCrypto ¶ added in v0.8.0 func NewCrypto(method Method, key string) (*Crypto, error) func (*Crypto) Decrypt ¶ added in v0.8.0 func (c *Crypto) Decrypt(in []byte) ([]byte, error) func (*Crypto) Encrypt ¶ added in v0.8.0 func (c *Crypto) Encrypt(in []byte) ([]byte, error) func (*Crypto) Method ¶ added in v0.8.0 func (c *Crypto) Method() Method type Method ¶ type Method uint8 const ( None Method = iota Aes128Gcm Aes256Gcm ChaCha20Poly1305 ) func (Method) ToString ¶ func (m Method) ToString() string Source Files ¶ View all Source files crypto.go Click to show internal directories. Click to hide internal directories.