import "github.com/fufuok/utils/xcrypto"
- func AesCBCDeB58(s string, key []byte) []byte
- func AesCBCDeB64(s string, key []byte) []byte
- func AesCBCDeHex(s string, key []byte) []byte
- func AesCBCDePKCS7B58(s string, key []byte) []byte
- func AesCBCDePKCS7B64(s string, key []byte) []byte
- func AesCBCDePKCS7Hex(s string, key []byte) []byte
- func AesCBCDePKCS7StringB58(s string, key []byte) string
- func AesCBCDePKCS7StringB64(s string, key []byte) string
- func AesCBCDePKCS7StringHex(s string, key []byte) string
- func AesCBCDeStringB58(s string, key []byte) string
- func AesCBCDeStringB64(s string, key []byte) string
- func AesCBCDeStringHex(s string, key []byte) string
- func AesCBCDecrypt(asPKCS7 bool, ciphertext, key []byte, ivs ...[]byte) (plaintext []byte)
- func AesCBCDecryptE(asPKCS7 bool, ciphertext, key []byte, ivs ...[]byte) ([]byte, error)
- func AesCBCEnB58(b, key []byte) string
- func AesCBCEnB64(b, key []byte) string
- func AesCBCEnHex(b, key []byte) string
- func AesCBCEnPKCS7B58(b, key []byte) string
- func AesCBCEnPKCS7B64(b, key []byte) string
- func AesCBCEnPKCS7Hex(b, key []byte) string
- func AesCBCEnPKCS7StringB58(s string, key []byte) string
- func AesCBCEnPKCS7StringB64(s string, key []byte) string
- func AesCBCEnPKCS7StringHex(s string, key []byte) string
- func AesCBCEnStringB58(s string, key []byte) string
- func AesCBCEnStringB64(s string, key []byte) string
- func AesCBCEnStringHex(s string, key []byte) string
- func AesCBCEncrypt(asPKCS7 bool, plaintext, key []byte, ivs ...[]byte) (ciphertext []byte)
- func AesCBCEncryptE(asPKCS7 bool, plaintext, key []byte, ivs ...[]byte) ([]byte, error)
- func AesGCMDeB58(s string, key, nonce []byte) []byte
- func AesGCMDeB64(s string, key, nonce []byte) []byte
- func AesGCMDeHex(s string, key, nonce []byte) []byte
- func AesGCMDeStringB58(s string, key, nonce []byte) string
- func AesGCMDeStringB64(s string, key, nonce []byte) string
- func AesGCMDeStringHex(s string, key, nonce []byte) string
- func AesGCMDecrypt(ciphertext, key, nonce []byte) (plaintext []byte)
- func AesGCMDecryptWithNonce(ciphertext, key, nonce, additionalData []byte) ([]byte, error)
- func AesGCMEnB58(b, key []byte) (string, []byte)
- func AesGCMEnB64(b, key []byte) (string, []byte)
- func AesGCMEnHex(b, key []byte) (string, []byte)
- func AesGCMEnStringB58(s string, key []byte) (string, []byte)
- func AesGCMEnStringB64(s string, key []byte) (string, []byte)
- func AesGCMEnStringHex(s string, key []byte) (string, []byte)
- func AesGCMEncrypt(plaintext, key []byte) (ciphertext []byte, nonce []byte)
- func AesGCMEncryptWithNonce(plaintext, key, nonce, additionalData []byte) ([]byte, []byte, error)
- func Decrypt(value, secret string) string
- func DesCBCDeB58(s string, key []byte) []byte
- func DesCBCDeB64(s string, key []byte) []byte
- func DesCBCDeHex(s string, key []byte) []byte
- func DesCBCDePKCS7B58(s string, key []byte) []byte
- func DesCBCDePKCS7B64(s string, key []byte) []byte
- func DesCBCDePKCS7Hex(s string, key []byte) []byte
- func DesCBCDePKCS7StringB58(s string, key []byte) string
- func DesCBCDePKCS7StringB64(s string, key []byte) string
- func DesCBCDePKCS7StringHex(s string, key []byte) string
- func DesCBCDeStringB58(s string, key []byte) string
- func DesCBCDeStringB64(s string, key []byte) string
- func DesCBCDeStringHex(s string, key []byte) string
- func DesCBCDecrypt(asPKCS7 bool, ciphertext, key []byte, ivs ...[]byte) (plaintext []byte)
- func DesCBCDecryptE(asPKCS7 bool, ciphertext, key []byte, ivs ...[]byte) ([]byte, error)
- func DesCBCEnB58(b, key []byte) string
- func DesCBCEnB64(b, key []byte) string
- func DesCBCEnHex(b, key []byte) string
- func DesCBCEnPKCS7B58(b, key []byte) string
- func DesCBCEnPKCS7B64(b, key []byte) string
- func DesCBCEnPKCS7Hex(b, key []byte) string
- func DesCBCEnPKCS7StringB58(s string, key []byte) string
- func DesCBCEnPKCS7StringB64(s string, key []byte) string
- func DesCBCEnPKCS7StringHex(s string, key []byte) string
- func DesCBCEnStringB58(s string, key []byte) string
- func DesCBCEnStringB64(s string, key []byte) string
- func DesCBCEnStringHex(s string, key []byte) string
- func DesCBCEncrypt(asPKCS7 bool, plaintext, key []byte, ivs ...[]byte) (ciphertext []byte)
- func DesCBCEncryptE(asPKCS7 bool, plaintext, key []byte, ivs ...[]byte) ([]byte, error)
- func Encrypt(value, secret string) string
- func GCMDeB58(s string, key []byte) []byte
- func GCMDeB64(s string, key []byte) []byte
- func GCMDeHex(s string, key []byte) []byte
- func GCMDeStringB58(s string, key []byte) string
- func GCMDeStringB64(s string, key []byte) string
- func GCMDeStringHex(s string, key []byte) string
- func GCMDecrypt(encrypted, key []byte) ([]byte, error)
- func GCMEnB58(b, key []byte) string
- func GCMEnB64(b, key []byte) string
- func GCMEnHex(b, key []byte) string
- func GCMEnStringB58(s string, key []byte) string
- func GCMEnStringB64(s string, key []byte) string
- func GCMEnStringHex(s string, key []byte) string
- func GCMEncrypt(plaintext, key []byte) ([]byte, error)
- func GenRSAKey(bits int) (publicKey, privateKey []byte)
- func GetenvDecrypt(key string, secret string) string
- func Padding(b []byte, bSize int, pkcs7 bool) []byte
- func ParsePrivateKey(privateKey []byte) (priv *rsa.PrivateKey, err error)
- func ParsePublicKey(publicKey []byte) (pub *rsa.PublicKey, err error)
- func RSADecrypt(ciphertext, privateKey []byte) ([]byte, error)
- func RSAEncrypt(plaintext, publicKey []byte) ([]byte, error)
- func RSASign(data, privateKey []byte) ([]byte, error)
- func RSASignVerify(data, publicKey, sig []byte) error
- func SetenvEncrypt(key, value, secret string) (string, error)
- func UnPadding(b []byte, pkcs7 bool) []byte
- func XOR(src, key []byte) []byte
- func XORDeB58(s string, key []byte) []byte
- func XORDeB64(s string, key []byte) []byte
- func XORDeHex(s string, key []byte) []byte
- func XORDeStringB58(s string, key []byte) string
- func XORDeStringB64(s string, key []byte) string
- func XORDeStringHex(s string, key []byte) string
- func XORE(src, key []byte) ([]byte, error)
- func XOREnB58(b, key []byte) string
- func XOREnB64(b, key []byte) string
- func XOREnHex(b, key []byte) string
- func XOREnStringB58(s string, key []byte) string
- func XOREnStringB64(s string, key []byte) string
- func XOREnStringHex(s string, key []byte) string
func AesCBCDeB58(s string, key []byte) []byte
AesCBCDeB58 解密, ZerosPadding
func AesCBCDeB64(s string, key []byte) []byte
AesCBCDeB64 解密, ZerosPadding
func AesCBCDeHex(s string, key []byte) []byte
AesCBCDeHex 解密, ZerosPadding
func AesCBCDePKCS7B58(s string, key []byte) []byte
AesCBCDePKCS7B58 解密, Pkcs7Padding
func AesCBCDePKCS7B64(s string, key []byte) []byte
AesCBCDePKCS7B64 解密, Pkcs7Padding
func AesCBCDePKCS7Hex(s string, key []byte) []byte
AesCBCDePKCS7Hex 解密, Pkcs7Padding
func AesCBCDePKCS7StringB58(s string, key []byte) string
AesCBCDePKCS7StringB58 解密, Pkcs7Padding
func AesCBCDePKCS7StringB64(s string, key []byte) string
AesCBCDePKCS7StringB64 解密, Pkcs7Padding
func AesCBCDePKCS7StringHex(s string, key []byte) string
AesCBCDePKCS7StringHex 解密, Pkcs7Padding
func AesCBCDeStringB58(s string, key []byte) string
AesCBCDeStringB58 解密, ZerosPadding
func AesCBCDeStringB64(s string, key []byte) string
AesCBCDeStringB64 解密, ZerosPadding
func AesCBCDeStringHex(s string, key []byte) string
AesCBCDeStringHex 解密, ZerosPadding
func AesCBCDecrypt(asPKCS7 bool, ciphertext, key []byte, ivs ...[]byte) (plaintext []byte)
AesCBCDecrypt AES-CBC 解密
func AesCBCDecryptE(asPKCS7 bool, ciphertext, key []byte, ivs ...[]byte) ([]byte, error)
AesCBCDecryptE AES-CBC 解密, 密码分组链接模式 (Cipher Block Chaining (CBC))
func AesCBCEnB58(b, key []byte) string
AesCBCEnB58 加密, ZerosPadding
func AesCBCEnB64(b, key []byte) string
AesCBCEnB64 加密, ZerosPadding
func AesCBCEnHex(b, key []byte) string
AesCBCEnHex 加密, ZerosPadding
func AesCBCEnPKCS7B58(b, key []byte) string
AesCBCEnPKCS7B58 加密, Pkcs7Padding
func AesCBCEnPKCS7B64(b, key []byte) string
AesCBCEnPKCS7B64 加密, Pkcs7Padding
func AesCBCEnPKCS7Hex(b, key []byte) string
AesCBCEnPKCS7Hex 加密, Pkcs7Padding
func AesCBCEnPKCS7StringB58(s string, key []byte) string
AesCBCEnPKCS7StringB58 加密, Pkcs7Padding
func AesCBCEnPKCS7StringB64(s string, key []byte) string
AesCBCEnPKCS7StringB64 加密, Pkcs7Padding
func AesCBCEnPKCS7StringHex(s string, key []byte) string
AesCBCEnPKCS7StringHex 加密, Pkcs7Padding
func AesCBCEnStringB58(s string, key []byte) string
AesCBCEnStringB58 加密, ZerosPadding
func AesCBCEnStringB64(s string, key []byte) string
AesCBCEnStringB64 加密, ZerosPadding
func AesCBCEnStringHex(s string, key []byte) string
AesCBCEnStringHex 加密, ZerosPadding
func AesCBCEncrypt(asPKCS7 bool, plaintext, key []byte, ivs ...[]byte) (ciphertext []byte)
AesCBCEncrypt AES-CBC 加密
func AesCBCEncryptE(asPKCS7 bool, plaintext, key []byte, ivs ...[]byte) ([]byte, error)
AesCBCEncryptE AES-CBC 加密, 密码分组链接模式 (Cipher Block Chaining (CBC)) key 长度分别是 16 (AES-128), 24 (AES-192?), 32 (AES-256?) asPKCS7: false (ZerosPadding), true (Pkcs7Padding)
func AesGCMDeB58(s string, key, nonce []byte) []byte
AesGCMDeB58 解密
func AesGCMDeB64(s string, key, nonce []byte) []byte
AesGCMDeB64 解密
func AesGCMDeHex(s string, key, nonce []byte) []byte
AesGCMDeHex 解密
func AesGCMDeStringB58(s string, key, nonce []byte) string
AesGCMDeStringB58 解密
func AesGCMDeStringB64(s string, key, nonce []byte) string
AesGCMDeStringB64 解密
func AesGCMDeStringHex(s string, key, nonce []byte) string
AesGCMDeStringHex 解密
func AesGCMDecrypt(ciphertext, key, nonce []byte) (plaintext []byte)
AesGCMDecrypt AES-GCM 解密
func AesGCMDecryptWithNonce(ciphertext, key, nonce, additionalData []byte) ([]byte, error)
AesGCMDecryptWithNonce AES-GCM 解密, (Galois/Counter Mode (GCM))
func AesGCMEnB58(b, key []byte) (string, []byte)
AesGCMEnB58 加密
func AesGCMEnB64(b, key []byte) (string, []byte)
AesGCMEnB64 加密
func AesGCMEnHex(b, key []byte) (string, []byte)
AesGCMEnHex 加密
func AesGCMEnStringB58(s string, key []byte) (string, []byte)
AesGCMEnStringB58 加密
func AesGCMEnStringB64(s string, key []byte) (string, []byte)
AesGCMEnStringB64 加密
func AesGCMEnStringHex(s string, key []byte) (string, []byte)
AesGCMEnStringHex 加密
func AesGCMEncrypt(plaintext, key []byte) (ciphertext []byte, nonce []byte)
AesGCMEncrypt AES-GCM 加密
func AesGCMEncryptWithNonce(plaintext, key, nonce, additionalData []byte) ([]byte, []byte, error)
AesGCMEncryptWithNonce AES-GCM 加密, (Galois/Counter Mode (GCM)) key 长度分别是 16 (AES-128), 32 (AES-256)
func Decrypt(value, secret string) string
Decrypt 解密
func DesCBCDeB58(s string, key []byte) []byte
DesCBCDeB58 解密, ZerosPadding
func DesCBCDeB64(s string, key []byte) []byte
DesCBCDeB64 解密, ZerosPadding
func DesCBCDeHex(s string, key []byte) []byte
DesCBCDeHex 解密, ZerosPadding
func DesCBCDePKCS7B58(s string, key []byte) []byte
DesCBCDePKCS7B58 解密, Pkcs7Padding
func DesCBCDePKCS7B64(s string, key []byte) []byte
DesCBCDePKCS7B64 解密, Pkcs7Padding
func DesCBCDePKCS7Hex(s string, key []byte) []byte
DesCBCDePKCS7Hex 解密, Pkcs7Padding
func DesCBCDePKCS7StringB58(s string, key []byte) string
DesCBCDePKCS7StringB58 解密, Pkcs7Padding
func DesCBCDePKCS7StringB64(s string, key []byte) string
DesCBCDePKCS7StringB64 解密, Pkcs7Padding
func DesCBCDePKCS7StringHex(s string, key []byte) string
DesCBCDePKCS7StringHex 解密, Pkcs7Padding
func DesCBCDeStringB58(s string, key []byte) string
DesCBCDeStringB58 解密, ZerosPadding
func DesCBCDeStringB64(s string, key []byte) string
DesCBCDeStringB64 解密, ZerosPadding
func DesCBCDeStringHex(s string, key []byte) string
DesCBCDeStringHex 解密, ZerosPadding
func DesCBCDecrypt(asPKCS7 bool, ciphertext, key []byte, ivs ...[]byte) (plaintext []byte)
DesCBCDecrypt AES-CBC 解密
func DesCBCDecryptE(asPKCS7 bool, ciphertext, key []byte, ivs ...[]byte) ([]byte, error)
DesCBCDecryptE DES-CBC 解密, 密码分组链接模式 (Cipher Block Chaining (CBC))
func DesCBCEnB58(b, key []byte) string
DesCBCEnB58 加密, ZerosPadding
func DesCBCEnB64(b, key []byte) string
DesCBCEnB64 加密, ZerosPadding
func DesCBCEnHex(b, key []byte) string
DesCBCEnHex 加密, ZerosPadding
func DesCBCEnPKCS7B58(b, key []byte) string
DesCBCEnPKCS7B58 加密, Pkcs7Padding
func DesCBCEnPKCS7B64(b, key []byte) string
DesCBCEnPKCS7B64 加密, Pkcs7Padding
func DesCBCEnPKCS7Hex(b, key []byte) string
DesCBCEnPKCS7Hex 加密, Pkcs7Padding
func DesCBCEnPKCS7StringB58(s string, key []byte) string
DesCBCEnPKCS7StringB58 加密, Pkcs7Padding
func DesCBCEnPKCS7StringB64(s string, key []byte) string
DesCBCEnPKCS7StringB64 加密, Pkcs7Padding
func DesCBCEnPKCS7StringHex(s string, key []byte) string
DesCBCEnPKCS7StringHex 加密, Pkcs7Padding
func DesCBCEnStringB58(s string, key []byte) string
DesCBCEnStringB58 加密, ZerosPadding
func DesCBCEnStringB64(s string, key []byte) string
DesCBCEnStringB64 加密, ZerosPadding
func DesCBCEnStringHex(s string, key []byte) string
DesCBCEnStringHex 加密, ZerosPadding
func DesCBCEncrypt(asPKCS7 bool, plaintext, key []byte, ivs ...[]byte) (ciphertext []byte)
DesCBCEncrypt AES-CBC 加密
func DesCBCEncryptE(asPKCS7 bool, plaintext, key []byte, ivs ...[]byte) ([]byte, error)
DesCBCEncryptE DES-CBC 加密, 密码分组链接模式 (Cipher Block Chaining (CBC)) key 长度固定为 8 asPKCS7: false (ZerosPadding), true (Pkcs7Padding)
func Encrypt(value, secret string) string
Encrypt 加密 (密钥取 32 位 MD5, AES-CBC, base58)
func GCMDeB58(s string, key []byte) []byte
GCMDeB58 解密
func GCMDeB64(s string, key []byte) []byte
GCMDeB64 解密
func GCMDeHex(s string, key []byte) []byte
GCMDeHex 解密
func GCMDeStringB58(s string, key []byte) string
GCMDeStringB58 解密
func GCMDeStringB64(s string, key []byte) string
GCMDeStringB64 解密
func GCMDeStringHex(s string, key []byte) string
GCMDeStringHex 解密
func GCMDecrypt(encrypted, key []byte) ([]byte, error)
GCMDecrypt AES-GCM 解密
func GCMEnB58(b, key []byte) string
GCMEnB58 加密
func GCMEnB64(b, key []byte) string
GCMEnB64 加密
func GCMEnHex(b, key []byte) string
GCMEnHex 加密
func GCMEnStringB58(s string, key []byte) string
GCMEnStringB58 加密
func GCMEnStringB64(s string, key []byte) string
GCMEnStringB64 加密
func GCMEnStringHex(s string, key []byte) string
GCMEnStringHex 加密
func GCMEncrypt(plaintext, key []byte) ([]byte, error)
GCMEncrypt AES-GCM 加密
func GenRSAKey(bits int) (publicKey, privateKey []byte)
GenRSAKey 生成 RSA 密钥对 openssl genrsa -out rsa_private_key.pem 1024 openssl rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem
func GetenvDecrypt(key string, secret string) string
GetenvDecrypt 解密环境变量参数(string)
func Padding(b []byte, bSize int, pkcs7 bool) []byte
Padding 填充
func ParsePrivateKey(privateKey []byte) (priv *rsa.PrivateKey, err error)
ParsePrivateKey parses an RSA private key in PKCS #1, ASN.1 DER form.
func ParsePublicKey(publicKey []byte) (pub *rsa.PublicKey, err error)
ParsePublicKey parses a public key in PKIX, ASN.1 DER form.
func RSADecrypt(ciphertext, privateKey []byte) ([]byte, error)
RSADecrypt 私钥解密
func RSAEncrypt(plaintext, publicKey []byte) ([]byte, error)
RSAEncrypt 公钥加密
func RSASign(data, privateKey []byte) ([]byte, error)
RSASign 私钥签名
func RSASignVerify(data, publicKey, sig []byte) error
RSASignVerify 公钥验证签名
func SetenvEncrypt(key, value, secret string) (string, error)
SetenvEncrypt 加密并设置环境变量(string)
func UnPadding(b []byte, pkcs7 bool) []byte
UnPadding 去除填充
func XOR(src, key []byte) []byte
XOR 异或加解密
func XORDeB58(s string, key []byte) []byte
XORDeB58 解密
func XORDeB64(s string, key []byte) []byte
XORDeB64 解密
func XORDeHex(s string, key []byte) []byte
XORDeHex 解密
func XORDeStringB58(s string, key []byte) string
XORDeStringB58 解密
func XORDeStringB64(s string, key []byte) string
XORDeStringB64 解密
func XORDeStringHex(s string, key []byte) string
XORDeStringHex 解密
func XORE(src, key []byte) ([]byte, error)
XORE RC4 加密算法(异或运算), 简单加解密, 不够安全 key 长度是 1-256
func XOREnB58(b, key []byte) string
XOREnB58 加密
func XOREnB64(b, key []byte) string
XOREnB64 加密
func XOREnHex(b, key []byte) string
XOREnHex 加密
func XOREnStringB58(s string, key []byte) string
XOREnStringB58 加密
func XOREnStringB64(s string, key []byte) string
XOREnStringB64 加密
func XOREnStringHex(s string, key []byte) string
XOREnStringHex 加密
Generated by gomarkdoc