gf: github.com/gogf/gf/crypto/gdes Index | Files

package gdes

import "github.com/gogf/gf/crypto/gdes"

Package gdes provides useful API for DES encryption/decryption algorithms.

Index

Package Files

gdes.go

Constants

const (
    NOPADDING = iota
    PKCS5PADDING
)

func DecryptCBC Uses

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

DecryptCBC decrypts <cipherText> using CBC mode.

func DecryptCBCTriple Uses

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

DecryptCBCTriple decrypts <cipherText> using TripleDES and CBC mode.

func DecryptECB Uses

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

DecryptECB decrypts <cipherText> using ECB mode.

func DecryptECBTriple Uses

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 Uses

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

EncryptCBC encrypts <plainText> using CBC mode.

func EncryptCBCTriple Uses

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

EncryptCBCTriple encrypts <plainText> using TripleDES and CBC mode.

func EncryptECB Uses

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

EncryptECB encrypts <plainText> using ECB mode.

func EncryptECBTriple Uses

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.

func Padding Uses

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

func PaddingPKCS5 Uses

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

func UnPadding Uses

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

func UnPaddingPKCS5 Uses

func UnPaddingPKCS5(text []byte) []byte

Package gdes imports 4 packages (graph) and is imported by 1 packages. Updated 2020-03-20. Refresh now. Tools for package owners.