Documentation ¶
Overview ¶
DES、3DES加解密示例,
- For crypter md5
Index ¶
- Constants
- func AuthCode(text, skey string, btype bool) string
- func Base64Decode(str string) []byte
- func DesDe(code, key string) string
- func DesDecrypt(args ...string) (string, error)
- func DesEn(code, key string) string
- func DesEncrypt(args ...string) (string, error)
- func EncryptedToken(token, key string) string
- func Md5Password(password string, rand ...string) string
- func Md5Sum(str string) string
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func TripleDesDecrypt(args ...string) (string, error)
- func TripleDesEncrypt(args ...string) (string, error)
- func ZeroPadding(ciphertext []byte, blockSize int) []byte
- func ZeroUnPadding(origData []byte) []byte
Constants ¶
View Source
const KEYS = "gfe023u_sefiel#fi32lf3z!" //必须24位
Variables ¶
This section is empty.
Functions ¶
func EncryptedToken ¶
func PKCS5Padding ¶
func PKCS5UnPadding ¶
func TripleDesEncrypt ¶
3DES加密, 可与php MCRYPT_3DES加密方式对应
func ZeroPadding ¶
func ZeroUnPadding ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.