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

package gdes

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

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

Index

Package Files

gdes.go

Constants

const (
    NOPADDING = iota
    PKCS5PADDING
)

func DesCBCDecrypt Uses

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

CBC模式DES解密

func DesCBCEncrypt Uses

func DesCBCEncrypt(key []byte, clearText []byte, iv []byte, padding int) ([]byte, error)

CBC模式DES加密

func DesECBDecrypt Uses

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

ECB模式DES解密

func DesECBEncrypt Uses

func DesECBEncrypt(key []byte, clearText []byte, padding int) ([]byte, error)

ECB模式DES加密

func PKCS5Padding Uses

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

PKCS5补位

func PKCS5Unpadding Uses

func PKCS5Unpadding(text []byte) []byte

去除PKCS5补位

func Padding Uses

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

补位方法

func TripleDesCBCDecrypt Uses

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

CBC模式3DES解密

func TripleDesCBCEncrypt Uses

func TripleDesCBCEncrypt(key []byte, clearText []byte, iv []byte, padding int) ([]byte, error)

CBC模式3DES加密

func TripleDesECBDecrypt Uses

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

ECB模式3DES解密,密钥长度可以是16或24位长

func TripleDesECBEncrypt Uses

func TripleDesECBEncrypt(key []byte, clearText []byte, padding int) ([]byte, error)

ECB模式3DES加密,密钥长度可以是16或24位长

func UnPadding Uses

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

去除补位方法

Package gdes imports 4 packages (graph). Updated 2019-06-26. Refresh now. Tools for package owners.