Documentation ¶
Index ¶
- func AesDecrypt(ciphertext, aesKey []byte) ([]byte, error)
- func AesEncrypt(origData, aesKey []byte) ([]byte, error)
- func Base64Decode(src string) ([]byte, error)
- func Base64Encode(src []byte) string
- func DecodeToken(token, product, privateKey string) string
- func DesDecrypt(ciphertext, desKey, iv []byte) ([]byte, error)
- func DesEncrypt(origData, desKey, iv []byte) ([]byte, error)
- func EncodeToken(timestamp int64, product, privateKey string) string
- func Md5(text string) string
- func NewECBDecrypter(b cipher.Block) cipher.BlockMode
- func NewECBEncrypter(b cipher.Block) cipher.BlockMode
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5UnPadding(ciphertext []byte) []byte
- func Rc4Decrypt(ciphertext []byte, key []byte) ([]byte, error)
- func Rc4Encrypt(originData []byte, key []byte) ([]byte, error)
- func RsaDecrypt(ciphertext, privateKey []byte) ([]byte, error)
- func RsaEncrypt(origData, publickKey []byte) ([]byte, error)
- func Urldecode(text string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶
AES解密,经济系统使用了ECB而非CBC的方式
func Base64Decode ¶
func Base64Encode ¶
func DesDecrypt ¶
func DesEncrypt ¶
func NewECBDecrypter ¶
NewECBDecrypter returns a BlockMode which decrypts in electronic code book mode, using the given Block.
func NewECBEncrypter ¶
NewECBEncrypter returns a BlockMode which encrypts in electronic code book mode, using the given Block.
func PKCS5Padding ¶
func PKCS5UnPadding ¶
func RsaDecrypt ¶
func RsaEncrypt ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.