Documentation ¶
Overview ¶
Package gdes provides useful API for DES encryption/decryption algorithms.
Index ¶
- Constants
- func DecryptCBC(cipherText []byte, key []byte, iv []byte, padding int) ([]byte, error)
- func DecryptCBCTriple(cipherText []byte, key []byte, iv []byte, padding int) ([]byte, error)
- func DecryptECB(cipherText []byte, key []byte, padding int) ([]byte, error)
- func DecryptECBTriple(cipherText []byte, key []byte, padding int) ([]byte, error)
- func EncryptCBC(plainText []byte, key []byte, iv []byte, padding int) ([]byte, error)
- func EncryptCBCTriple(plainText []byte, key []byte, iv []byte, padding int) ([]byte, error)
- func EncryptECB(plainText []byte, key []byte, padding int) ([]byte, error)
- func EncryptECBTriple(plainText []byte, key []byte, padding int) ([]byte, error)
- func Padding(text []byte, padding int) ([]byte, error)
- func PaddingPKCS5(text []byte, blockSize int) []byte
- func UnPadding(text []byte, padding int) ([]byte, error)
- func UnPaddingPKCS5(text []byte) []byte
Constants ¶
const ( NOPADDING = iota PKCS5PADDING )
Variables ¶
This section is empty.
Functions ¶
func DecryptCBC ¶
DecryptCBC decrypts `cipherText` using CBC mode.
func DecryptCBCTriple ¶
DecryptCBCTriple decrypts `cipherText` using TripleDES and CBC mode.
func DecryptECB ¶
DecryptECB decrypts `cipherText` using ECB mode.
func DecryptECBTriple ¶
DecryptECBTriple decrypts `cipherText` using TripleDES and ECB mode. The length of the `key` should be either 16 or 24 bytes.
func EncryptCBC ¶
EncryptCBC encrypts `plainText` using CBC mode.
func EncryptCBCTriple ¶
EncryptCBCTriple encrypts `plainText` using TripleDES and CBC mode.
func EncryptECB ¶
EncryptECB encrypts `plainText` using ECB mode.
func EncryptECBTriple ¶
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.