Documentation ¶
Index ¶
- type Encryption
- func (_Encryption *Encryption) DesDecrypt(data string, key []byte) ([]byte, error)
- func (_Encryption *Encryption) DesEncrypt(origData, key []byte) (string, error)
- func (_Encryption *Encryption) PKCS5Padding(cipherText []byte, blockSize int) []byte
- func (_Encryption *Encryption) PKCS5UnPadding(origData []byte) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encryption ¶
type Encryption struct { }
func NewEncryption ¶
func NewEncryption() *Encryption
func (*Encryption) DesDecrypt ¶
func (_Encryption *Encryption) DesDecrypt(data string, key []byte) ([]byte, error)
DesDecrypt des解密
func (*Encryption) DesEncrypt ¶
func (_Encryption *Encryption) DesEncrypt(origData, key []byte) (string, error)
DesEncrypt desc 加密
func (*Encryption) PKCS5Padding ¶
func (_Encryption *Encryption) PKCS5Padding(cipherText []byte, blockSize int) []byte
PKCS5Padding 填充方式PKCS5Padding
func (*Encryption) PKCS5UnPadding ¶
func (_Encryption *Encryption) PKCS5UnPadding(origData []byte) []byte
PKCS5UnPadding 对应 PKCS5Padding
Click to show internal directories.
Click to hide internal directories.