des

package
v0.0.0-...-6596117 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 5 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)

DecryptCBC decrypts `cipherText` using CBC mode.

func DecryptCBCTriple

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

DecryptCBCTriple decrypts `cipherText` using TripleDES and CBC mode.

func DecryptECB

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

DecryptECB decrypts `cipherText` using ECB mode.

func DecryptECBTriple

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

DecryptECBTriple decrypts `cipherText` using TripleDES and ECB mode. 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)

EncryptCBC encrypts `plainText` using CBC mode.

func EncryptCBCTriple

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

EncryptCBCTriple encrypts `plainText` using TripleDES and CBC mode.

func EncryptECB

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

EncryptECB encrypts `plainText` using ECB mode.

func EncryptECBTriple

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

EncryptECBTriple encrypts `plainText` using TripleDES and ECB mode. The length of the `key` should be either 16 or 24 bytes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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