Documentation ¶
Index ¶
- Constants
- func AESCBCDecrypt(encryptData, iv, key []byte) ([]byte, error)
- func AESCBCDecryptDefault(cipherData []byte, aesKey []byte) ([]byte, error)
- func AESCBCEncrypt(rawData, iv, key []byte) ([]byte, error)
- func AESCBCEncryptDefault(plainData []byte, aesKey []byte) ([]byte, error)
- func Base64DecodeBytes2String(src []byte) string
- func Base64DecodeString2Bytes(src string) (result []byte, err error)
- func Base64DecodeString2String(src string) (string, error)
- func Base64DecodeWithTable(src []byte, base64table string) (dst []byte, err error)
- func Base64EncodeBytes2Bytes(src []byte) (result []byte)
- func Base64EncodeBytes2String(src []byte) string
- func Base64EncodeString2Bytes(src string) (result []byte)
- func Base64EncodeString2String(src string) string
- func CBCDecrypt(block cipher.Block, src, iv []byte, padding string) ([]byte, error)
- func CBCEncrypt(block cipher.Block, src, iv []byte, padding string) ([]byte, error)
- func DESDeCryptWithVI(crypted, key, vi []byte) ([]byte, error)
- func DESDecrypt(crypted, key, vi []byte, padmode int) ([]byte, error)
- func DESEnCryptWithVI(origData, key, vi []byte) []byte
- func DESEncrypt(origData, key, vi []byte, padmode int) ([]byte, error)
- func HmacSha1Byte(key, data []byte) []byte
- func HmacSha1String(key, data string) string
- func MD5(s string) string
- func PKCS5Padding(src []byte, blockSize int) []byte
- func PKCS5Unpadding(src []byte) []byte
- func PKCS7Padding(ciphertext []byte, blockSize int) []byte
- func PKCS7UnPadding(origData []byte) []byte
- func Padding(padding string, src []byte, blockSize int) []byte
- func SHA1(key, data string) string
- func SHA1Default(s string) string
- func ThriDESDecrypt(crypted, key []byte) ([]byte, error)
- func ThriDESEncrypt(origData, key []byte) ([]byte, error)
- func UnPadding(padding string, src []byte) []byte
- func ZerosPadding(src []byte, blockSize int) []byte
- func ZerosUnPadding(src []byte) []byte
Constants ¶
View Source
const ( MOD_PKCS7 = 1 MOD_PKCS5 = 2 MOD_ZERO = 3 )
View Source
const PKCS5_PADDING = "PKCS5"
View Source
const PKCS7_PADDING = "PKCS7"
View Source
const ZEROS_PADDING = "ZEROS"
Variables ¶
This section is empty.
Functions ¶
func AESCBCDecrypt ¶
AES 标准解密 encryptData 密文字节数组 iv 初始向量 key 密钥
func AESCBCDecryptDefault ¶
AESCBCDecryptDefault 标准AES解密
func AESCBCEncrypt ¶
========================================
AES-CBC加密算法(128位)
======================================== AES 标准加密 rawData 明文字节数组 iv 初始向量 key 密钥
func AESCBCEncryptDefault ¶
AESCBCEncryptDefault 标准AES加密
func Base64DecodeString2Bytes ¶
base64 标准解密
func Base64DecodeString2String ¶
base64 标准解密
func Base64DecodeWithTable ¶
base64 自定义码表解密返回byte
func Base64EncodeString2Bytes ¶
base64 标准加密
func CBCDecrypt ¶
CBCDecrypt
func CBCEncrypt ¶
CBCEncrypt
func DESEnCryptWithVI ¶
========================================
DES加密算法
========================================
func PKCS5Padding ¶
func PKCS5Unpadding ¶
func ThriDESEncrypt ¶
========================================
3DES加密算法
========================================
func ZerosPadding ¶
func ZerosUnPadding ¶
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.