des

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NOPADDING = iota
	PKCS5PADDING
)

Variables

This section is empty.

Functions

func DecryptCBC

func DecryptCBC(cipherText []byte, key []byte, iv []byte, padding int) ([]byte, error)

func DecryptCBCTriple

func DecryptCBCTriple(cipherText []byte, key []byte, iv []byte, padding int) ([]byte, error)

func DecryptECB

func DecryptECB(cipherText []byte, key []byte, padding int) ([]byte, error)

func DecryptECBTriple

func DecryptECBTriple(cipherText []byte, key []byte, padding int) ([]byte, error)

The length of the <key> should be either 16 or 24 bytes.

func EncryptCBC

func EncryptCBC(plainText []byte, key []byte, iv []byte, padding int) ([]byte, error)

func EncryptCBCTriple

func EncryptCBCTriple(plainText []byte, key []byte, iv []byte, padding int) ([]byte, error)

func EncryptECB

func EncryptECB(plainText []byte, key []byte, padding int) ([]byte, error)

func EncryptECBTriple

func EncryptECBTriple(plainText []byte, key []byte, padding int) ([]byte, error)

The length of the <key> should be either 16 or 24 bytes.

func Padding

func Padding(text []byte, padding int) ([]byte, error)

func PaddingPKCS5

func PaddingPKCS5(text []byte, blockSize int) []byte

func UnPadding

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

func UnPaddingPKCS5

func UnPaddingPKCS5(text []byte) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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