cipher

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aes added in v1.1.0

type Aes struct {
	C.Block
}

func (*Aes) Decrypt added in v1.1.0

func (c *Aes) Decrypt(cipherData []byte) (originData []byte, err error)

func (*Aes) Encrypt added in v1.1.0

func (c *Aes) Encrypt(originData []byte) (cipherData []byte, err error)

type Cipher

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

Cipher 加解密

func NewAes added in v1.1.0

func NewAes(key []byte) (Cipher, error)

func NewCipher

func NewCipher(key []byte) (Cipher, error)

func NewEmpty added in v1.1.0

func NewEmpty() (Cipher, error)

type Empty added in v1.1.0

type Empty struct {
}

func (Empty) Decrypt added in v1.1.0

func (e Empty) Decrypt(cipherData []byte) (originData []byte, err error)

func (Empty) Encrypt added in v1.1.0

func (e Empty) Encrypt(originData []byte) (cipherData []byte, err error)

Jump to

Keyboard shortcuts

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