cipher

package
v2.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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