xcipher

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AES128

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

func NewAES128

func NewAES128(secret string) (*AES128, error)

func (AES128) Decrypt

func (ciph AES128) Decrypt(in []byte) ([]byte, error)

decryption using AES-GCM

func (AES128) Encrypt

func (ciph AES128) Encrypt(in []byte) ([]byte, error)

encryption using AES-GCM

type AES256

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

func NewAES256

func NewAES256(secret string) (*AES256, error)

func (AES256) Decrypt

func (ciph AES256) Decrypt(in []byte) ([]byte, error)

decryption using AES-GCM

func (AES256) Encrypt

func (ciph AES256) Encrypt(in []byte) ([]byte, error)

encryption using AES-GCM

type Cipher

type Cipher interface {
	Encrypt([]byte) ([]byte, error)
	Decrypt([]byte) ([]byte, error)
}

Jump to

Keyboard shortcuts

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