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) []byteAesCBCDeB58 解密, ZerosPadding
func AesCBCDeB64(s string, key []byte) []byteAesCBCDeB64 解密, ZerosPadding
func AesCBCDeHex(s string, key []byte) []byteAesCBCDeHex 解密, ZerosPadding
func AesCBCDePKCS7B58(s string, key []byte) []byteAesCBCDePKCS7B58 解密, Pkcs7Padding
func AesCBCDePKCS7B64(s string, key []byte) []byteAesCBCDePKCS7B64 解密, Pkcs7Padding
func AesCBCDePKCS7Hex(s string, key []byte) []byteAesCBCDePKCS7Hex 解密, Pkcs7Padding
func AesCBCDePKCS7StringB58(s string, key []byte) stringAesCBCDePKCS7StringB58 解密, Pkcs7Padding
func AesCBCDePKCS7StringB64(s string, key []byte) stringAesCBCDePKCS7StringB64 解密, Pkcs7Padding
func AesCBCDePKCS7StringHex(s string, key []byte) stringAesCBCDePKCS7StringHex 解密, Pkcs7Padding
func AesCBCDeStringB58(s string, key []byte) stringAesCBCDeStringB58 解密, ZerosPadding
func AesCBCDeStringB64(s string, key []byte) stringAesCBCDeStringB64 解密, ZerosPadding
func AesCBCDeStringHex(s string, key []byte) stringAesCBCDeStringHex 解密, 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) stringAesCBCEnB58 加密, ZerosPadding
func AesCBCEnB64(b, key []byte) stringAesCBCEnB64 加密, ZerosPadding
func AesCBCEnHex(b, key []byte) stringAesCBCEnHex 加密, ZerosPadding
func AesCBCEnPKCS7B58(b, key []byte) stringAesCBCEnPKCS7B58 加密, Pkcs7Padding
func AesCBCEnPKCS7B64(b, key []byte) stringAesCBCEnPKCS7B64 加密, Pkcs7Padding
func AesCBCEnPKCS7Hex(b, key []byte) stringAesCBCEnPKCS7Hex 加密, Pkcs7Padding
func AesCBCEnPKCS7StringB58(s string, key []byte) stringAesCBCEnPKCS7StringB58 加密, Pkcs7Padding
func AesCBCEnPKCS7StringB64(s string, key []byte) stringAesCBCEnPKCS7StringB64 加密, Pkcs7Padding
func AesCBCEnPKCS7StringHex(s string, key []byte) stringAesCBCEnPKCS7StringHex 加密, Pkcs7Padding
func AesCBCEnStringB58(s string, key []byte) stringAesCBCEnStringB58 加密, ZerosPadding
func AesCBCEnStringB64(s string, key []byte) stringAesCBCEnStringB64 加密, ZerosPadding
func AesCBCEnStringHex(s string, key []byte) stringAesCBCEnStringHex 加密, 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) []byteAesGCMDeB58 解密
func AesGCMDeB64(s string, key, nonce []byte) []byteAesGCMDeB64 解密
func AesGCMDeHex(s string, key, nonce []byte) []byteAesGCMDeHex 解密
func AesGCMDeStringB58(s string, key, nonce []byte) stringAesGCMDeStringB58 解密
func AesGCMDeStringB64(s string, key, nonce []byte) stringAesGCMDeStringB64 解密
func AesGCMDeStringHex(s string, key, nonce []byte) stringAesGCMDeStringHex 解密
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) stringDecrypt 解密
func DesCBCDeB58(s string, key []byte) []byteDesCBCDeB58 解密, ZerosPadding
func DesCBCDeB64(s string, key []byte) []byteDesCBCDeB64 解密, ZerosPadding
func DesCBCDeHex(s string, key []byte) []byteDesCBCDeHex 解密, ZerosPadding
func DesCBCDePKCS7B58(s string, key []byte) []byteDesCBCDePKCS7B58 解密, Pkcs7Padding
func DesCBCDePKCS7B64(s string, key []byte) []byteDesCBCDePKCS7B64 解密, Pkcs7Padding
func DesCBCDePKCS7Hex(s string, key []byte) []byteDesCBCDePKCS7Hex 解密, Pkcs7Padding
func DesCBCDePKCS7StringB58(s string, key []byte) stringDesCBCDePKCS7StringB58 解密, Pkcs7Padding
func DesCBCDePKCS7StringB64(s string, key []byte) stringDesCBCDePKCS7StringB64 解密, Pkcs7Padding
func DesCBCDePKCS7StringHex(s string, key []byte) stringDesCBCDePKCS7StringHex 解密, Pkcs7Padding
func DesCBCDeStringB58(s string, key []byte) stringDesCBCDeStringB58 解密, ZerosPadding
func DesCBCDeStringB64(s string, key []byte) stringDesCBCDeStringB64 解密, ZerosPadding
func DesCBCDeStringHex(s string, key []byte) stringDesCBCDeStringHex 解密, 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) stringDesCBCEnB58 加密, ZerosPadding
func DesCBCEnB64(b, key []byte) stringDesCBCEnB64 加密, ZerosPadding
func DesCBCEnHex(b, key []byte) stringDesCBCEnHex 加密, ZerosPadding
func DesCBCEnPKCS7B58(b, key []byte) stringDesCBCEnPKCS7B58 加密, Pkcs7Padding
func DesCBCEnPKCS7B64(b, key []byte) stringDesCBCEnPKCS7B64 加密, Pkcs7Padding
func DesCBCEnPKCS7Hex(b, key []byte) stringDesCBCEnPKCS7Hex 加密, Pkcs7Padding
func DesCBCEnPKCS7StringB58(s string, key []byte) stringDesCBCEnPKCS7StringB58 加密, Pkcs7Padding
func DesCBCEnPKCS7StringB64(s string, key []byte) stringDesCBCEnPKCS7StringB64 加密, Pkcs7Padding
func DesCBCEnPKCS7StringHex(s string, key []byte) stringDesCBCEnPKCS7StringHex 加密, Pkcs7Padding
func DesCBCEnStringB58(s string, key []byte) stringDesCBCEnStringB58 加密, ZerosPadding
func DesCBCEnStringB64(s string, key []byte) stringDesCBCEnStringB64 加密, ZerosPadding
func DesCBCEnStringHex(s string, key []byte) stringDesCBCEnStringHex 加密, 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) stringEncrypt 加密 (密钥取 32 位 MD5, AES-CBC, base58)
func GCMDeB58(s string, key []byte) []byteGCMDeB58 解密
func GCMDeB64(s string, key []byte) []byteGCMDeB64 解密
func GCMDeHex(s string, key []byte) []byteGCMDeHex 解密
func GCMDeStringB58(s string, key []byte) stringGCMDeStringB58 解密
func GCMDeStringB64(s string, key []byte) stringGCMDeStringB64 解密
func GCMDeStringHex(s string, key []byte) stringGCMDeStringHex 解密
func GCMDecrypt(encrypted, key []byte) ([]byte, error)GCMDecrypt AES-GCM 解密
func GCMEnB58(b, key []byte) stringGCMEnB58 加密
func GCMEnB64(b, key []byte) stringGCMEnB64 加密
func GCMEnHex(b, key []byte) stringGCMEnHex 加密
func GCMEnStringB58(s string, key []byte) stringGCMEnStringB58 加密
func GCMEnStringB64(s string, key []byte) stringGCMEnStringB64 加密
func GCMEnStringHex(s string, key []byte) stringGCMEnStringHex 加密
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) stringGetenvDecrypt 解密环境变量参数(string)
func Padding(b []byte, bSize int, pkcs7 bool) []bytePadding 填充
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) errorRSASignVerify 公钥验证签名
func SetenvEncrypt(key, value, secret string) (string, error)SetenvEncrypt 加密并设置环境变量(string)
func UnPadding(b []byte, pkcs7 bool) []byteUnPadding 去除填充
func XOR(src, key []byte) []byteXOR 异或加解密
func XORDeB58(s string, key []byte) []byteXORDeB58 解密
func XORDeB64(s string, key []byte) []byteXORDeB64 解密
func XORDeHex(s string, key []byte) []byteXORDeHex 解密
func XORDeStringB58(s string, key []byte) stringXORDeStringB58 解密
func XORDeStringB64(s string, key []byte) stringXORDeStringB64 解密
func XORDeStringHex(s string, key []byte) stringXORDeStringHex 解密
func XORE(src, key []byte) ([]byte, error)XORE RC4 加密算法(异或运算), 简单加解密, 不够安全 key 长度是 1-256
func XOREnB58(b, key []byte) stringXOREnB58 加密
func XOREnB64(b, key []byte) stringXOREnB64 加密
func XOREnHex(b, key []byte) stringXOREnHex 加密
func XOREnStringB58(s string, key []byte) stringXOREnStringB58 加密
func XOREnStringB64(s string, key []byte) stringXOREnStringB64 加密
func XOREnStringHex(s string, key []byte) stringXOREnStringHex 加密
Generated by gomarkdoc