cipher

package
v2.4.7 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt added in v2.4.1

func Decrypt(ciphertext []byte) ([]byte, error)

Types

type AES added in v2.4.0

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

func NewAES added in v2.4.0

func NewAES(key []byte) *AES

func (*AES) Decrypt added in v2.4.0

func (c *AES) Decrypt(ciphertext []byte) ([]byte, error)

func (*AES) Encrypt added in v2.4.0

func (c *AES) Encrypt(plaintext []byte) ([]byte, error)

type Cipher

type Cipher interface {
	Encrypt(plaintext []byte) ([]byte, error)
	Decrypt(ciphertext []byte) ([]byte, error)
}
var AESCipher Cipher
var RC4Cipher Cipher

type RC4

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

func NewRC4

func NewRC4(key []byte) *RC4

func (*RC4) Decrypt

func (c *RC4) Decrypt(ciphertext []byte) ([]byte, error)

func (*RC4) Encrypt

func (c *RC4) Encrypt(plaintext []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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