ciphers

package
v1.2.85 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CBC = iota + 1
	EBC
)
View Source
const (
	ZEROS = iota
	PKCS5
	PKCS7
)

Variables

View Source
var (
	ErrUnPadding = errors.Warning("cbc: unPadding error")
)

Functions

func CBCDecrypt

func CBCDecrypt(block cipher.Block, encrypted, iv []byte, padding int) (plain []byte, err error)

func CBCEncrypt

func CBCEncrypt(block cipher.Block, plain, iv []byte, padding int) (encrypted []byte, err error)

func ECBDecrypt

func ECBDecrypt(block cipher.Block, encrypted []byte, padding int) (plain []byte, err error)

func ECBEncrypt

func ECBEncrypt(block cipher.Block, plain []byte, padding int) (encrypted []byte, err error)

func Padding

func Padding(padding int, src []byte, blockSize int) []byte

func UnPadding

func UnPadding(padding int, src []byte) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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