Documentation
¶
Index ¶
- Variables
- func CodecFlowExec(req *ypb.CodecRequestFlow) (resp *ypb.CodecResponse, err error)
- type CodecExecFlow
- func (flow *CodecExecFlow) AESDecrypt(key string, keyType string, IV string, ivType string, mode string, ...) error
- func (flow *CodecExecFlow) AESEncrypt(key string, keyType string, IV string, ivType string, mode string, ...) error
- func (flow *CodecExecFlow) Base64Decode(Alphabet string) error
- func (flow *CodecExecFlow) Base64Encode(Alphabet string) error
- func (flow *CodecExecFlow) CbcMac(alg, key, keyType string, output outputType, paddingType string) error
- func (flow *CodecExecFlow) CharsetToUTF8(charset string) error
- func (flow *CodecExecFlow) Cmac(alg string, key string, keyType string, output outputType) error
- func (flow *CodecExecFlow) CodecPlugin(pluginName string) error
- func (flow *CodecExecFlow) CustomCodecPlugin(pluginContent string) error
- func (flow *CodecExecFlow) DESDecrypt(key string, keyType string, IV string, ivType string, mode string, ...) error
- func (flow *CodecExecFlow) DESEncrypt(key string, keyType string, IV string, ivType string, mode string, ...) error
- func (flow *CodecExecFlow) Find(find string, findType string, Global, Multiline, IgnoreCase bool) error
- func (flow *CodecExecFlow) Fuzz() error
- func (flow *CodecExecFlow) GB18030ToUTF8() error
- func (flow *CodecExecFlow) HexDecode() error
- func (flow *CodecExecFlow) HexEncode() error
- func (flow *CodecExecFlow) Hmac(key string, keyType string, hashMethod string, output outputType) error
- func (flow *CodecExecFlow) HtmlDecode() error
- func (flow *CodecExecFlow) HtmlEncode(entityRef string, fullEncode bool) error
- func (flow *CodecExecFlow) JavaSerialize(output string) error
- func (flow *CodecExecFlow) JavaUnserialize(input string, output string) error
- func (flow *CodecExecFlow) JsonFormat(mode string) error
- func (flow *CodecExecFlow) JwtParse() error
- func (flow *CodecExecFlow) JwtSign(algorithm string, key []byte, isBase64 bool) error
- func (flow *CodecExecFlow) MD5() error
- func (flow *CodecExecFlow) MakePacket(mode string) error
- func (flow *CodecExecFlow) Packet2cURL(https bool) error
- func (flow *CodecExecFlow) RSADecrypt(priKey string, decryptSchema string, algorithm string) error
- func (flow *CodecExecFlow) RSAEncrypt(pubKey string, encryptSchema string, algorithm string) error
- func (flow *CodecExecFlow) Replace(find string, replace string, findType string, ...) error
- func (flow *CodecExecFlow) SHA1() error
- func (flow *CodecExecFlow) SHA2(size string) error
- func (flow *CodecExecFlow) SM3() error
- func (flow *CodecExecFlow) SM4Decrypt(key string, keyType string, IV string, ivType string, mode string, ...) error
- func (flow *CodecExecFlow) SM4Encrypt(key string, keyType string, IV string, ivType string, mode string, ...) error
- func (flow *CodecExecFlow) TripleDESDecrypt(key string, keyType string, IV string, ivType string, mode string, ...) error
- func (flow *CodecExecFlow) TripleDESEncrypt(key string, keyType string, IV string, ivType string, mode string, ...) error
- func (flow *CodecExecFlow) URLDecode() error
- func (flow *CodecExecFlow) URLEncode(fullEncode bool) error
- func (flow *CodecExecFlow) UTF8ToCharset(charset string) error
- func (flow *CodecExecFlow) UnicodeDecode() error
- func (flow *CodecExecFlow) UnicodeEncode() error
Constants ¶
This section is empty.
Variables ¶
var ( CodecLibs *yakdoc.ScriptLib CodecLibsDoc []*ypb.CodecMethod // 记录函数的数据,参数类型等,用于前端生成样式 )
var ( OUTPUT_RAW = "raw" OUTPUT_HEX = "hex" OUTPUT_BASE64 = "base64" )
Functions ¶
func CodecFlowExec ¶ added in v1.3.3
func CodecFlowExec(req *ypb.CodecRequestFlow) (resp *ypb.CodecResponse, err error)
Types ¶
type CodecExecFlow ¶
func NewCodecExecFlow ¶
func NewCodecExecFlow(text []byte, flow []*ypb.CodecWork) *CodecExecFlow
func (*CodecExecFlow) AESDecrypt ¶
func (flow *CodecExecFlow) AESDecrypt(key string, keyType string, IV string, ivType string, mode string, input outputType, paddingType string) error
Tag = "解密" CodecName = "AES对称解密" Desc = """高级加密标准(AES)是美国联邦信息处理标准(FIPS)。它是在一个历时5年的过程中,从15个竞争设计中选出的。 Key:根据密钥的大小,将使用以下算法: 16字节 = AES-128 24字节 = AES-192 32字节 = AES-256""" Params = [ { Name = "key", Type = "inputSelect", Required = true,Label = "Key", Connector ={ Name = "keyType", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "key格式"} }, { Name = "IV", Type = "inputSelect", Required = false ,Label = "IV", Connector ={ Name = "ivType", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "IV格式"} }, { Name = "mode", Type = "select", DefaultValue = "CBC",Options = ["CBC", "ECB", "CTR"], Required = true, Label = "Mode"}, { Name = "input", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true,Label = "输入格式"}, { Name = "paddingType", Type = "select", DefaultValue = "pkcs", Options = ["pkcs", "zeroPadding"], Required = true,Label = "填充方式"} ]
func (*CodecExecFlow) AESEncrypt ¶
func (flow *CodecExecFlow) AESEncrypt(key string, keyType string, IV string, ivType string, mode string, output outputType, paddingType string) error
Tag = "加密" CodecName = "AES对称加密" Desc ="""高级加密标准(AES)是美国联邦信息处理标准(FIPS)。它是在一个历时5年的过程中,从15个竞争设计中选出的。 Key:根据密钥的大小,将使用以下算法: 16字节 = AES-128 24字节 = AES-192 32字节 = AES-256 你可以使用其中一个KDF操作生成基于密码的密钥。""" Params = [ { Name = "key", Type = "inputSelect", Required = true,Label = "Key", Connector ={ Name = "keyType", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "key格式"} }, { Name = "IV", Type = "inputSelect", Required = false ,Label = "IV", Connector ={ Name = "ivType", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "IV格式"} }, { Name = "mode", Type = "select", DefaultValue = "CBC",Options = ["CBC", "ECB", "CTR"], Required = true, Label = "Mode"}, { Name = "output", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "输出格式"}, { Name = "paddingType", Type = "select", DefaultValue = "pkcs", Options = ["pkcs", "zeroPadding"], Required = true,Label = "填充方式"} ]
func (*CodecExecFlow) Base64Decode ¶
func (flow *CodecExecFlow) Base64Decode(Alphabet string) error
Tag = "解码" CodecName = "base64解码" Desc = """Base64是一种基于64个可打印字符来表示二进制数据的表示方法。常用于在通常处理文本数据的场合,表示、传输、存储一些二进制数据,包括MIME的电子邮件及XML的一些复杂数据。 eg: eWFr -> yak""" Params = [ { Name = "Alphabet", Type = "select",DefaultValue = "standard",Options = ["standard", "urlsafe"], Required = true,Lable = "Alphabet" } ]
func (*CodecExecFlow) Base64Encode ¶
func (flow *CodecExecFlow) Base64Encode(Alphabet string) error
Tag = "编码" CodecName = "base64编码" Desc = """Base64是一种基于64个可打印字符来表示二进制数据的表示方法。常用于在通常处理文本数据的场合,表示、传输、存储一些二进制数据,包括MIME的电子邮件及XML的一些复杂数据。 eg: yak -> eWFr""" Params = [ { Name = "Alphabet", Type = "select",DefaultValue = "standard", Options = ["standard", "urlsafe"], Required = true,Label = "Alphabet"} ]
func (*CodecExecFlow) CbcMac ¶ added in v1.3.3
func (flow *CodecExecFlow) CbcMac(alg, key, keyType string, output outputType, paddingType string) error
Tag = "MAC" CodecName = "CBC-MAC" Desc = """CBC-MAC(Cipher Block Chaining Message Authentication Code)是一种基于块密码的消息认证码(MAC)构造技术。它通过在密码块链(CBC)模式下加密消息来创建一个块链,其中每个块都依赖于前一个块的正确加密。""" Params = [ { Name = "key", Type = "inputSelect", Required = true,Label = "Key", Connector ={ Name = "keyType", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "key格式"} }, { Name = "alg", Type = "select",DefaultValue = "AES", Options = ["SM4", "DES","AES"], Required = true ,Label = "加密算法"}, { Name = "output", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "输出格式"}, { Name = "paddingType", Type = "select", DefaultValue = "pkcs", Options = ["pkcs", "zeroPadding"], Required = true,Label = "填充方式"} ]
func (*CodecExecFlow) CharsetToUTF8 ¶
func (flow *CodecExecFlow) CharsetToUTF8(charset string) error
Tag = "其他" CodecName = "字符集转换为UTF8字符集" Desc ="""尝试将文本从指定的字符集转换为UTF-8字符集。""" Params = [ { Name = "charset", Type = "select",DefaultValue = "gb18030",Options = ["gb18030", "windows-1252", "iso-8859-1", "big5", "utf-16"], Required = true , Label = "字符集"}, ]
func (*CodecExecFlow) Cmac ¶ added in v1.3.3
func (flow *CodecExecFlow) Cmac(alg string, key string, keyType string, output outputType) error
Tag = "MAC" CodecName = "CMAC" Desc = """CMAC(Cipher-based Message Authentication Code)是一种基于密码的消息认证码(MAC)算法,它使用对称加密算法来生成消息的认证码。CMAC的主要目的是确保消息的完整性和身份验证。它通过将消息与密钥一起处理,生成一个固定长度的认证码,该认证码可以被发送者和接收者用来验证消息的完整性和来源。""" Params = [ { Name = "key", Type = "inputSelect", Required = true,Label = "Key", Connector ={ Name = "keyType", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "key格式"} }, { Name = "alg", Type = "select",DefaultValue = "AES", Options = ["SM4", "DES","AES","3DES"], Required = true ,Label = "加密算法"}, { Name = "output", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "输出格式"} ]
func (*CodecExecFlow) CodecPlugin ¶
func (flow *CodecExecFlow) CodecPlugin(pluginName string) error
Tag = "Yak脚本" CodecName = "本地Codec插件" Desc = """本地Codec插件""" Params = [ { Name = "pluginName", Type = "search", Required = true , Label = "插件名"}, ]
func (*CodecExecFlow) CustomCodecPlugin ¶
func (flow *CodecExecFlow) CustomCodecPlugin(pluginContent string) error
Tag = "Yak脚本" CodecName = "临时Codec插件" Desc = """自定义临时Codec插件""" Params = [ { Name = "pluginContent", Type = "monaco", Required = true , Label = "插件内容"}, ]
func (*CodecExecFlow) DESDecrypt ¶
func (flow *CodecExecFlow) DESDecrypt(key string, keyType string, IV string, ivType string, mode string, input outputType, paddingType string) error
Tag = "解密" CodecName = "DES对称解密" Desc = """DES(Data Encryption Standard)是一种对称密钥加密算法,使用固定有效长度为56位的密钥对数据进行64位的分组加密。尽管曾广泛使用,但由于密钥太短,现已被认为不够安全。""" Params = [ { Name = "key", Type = "inputSelect", Required = true,Label = "Key", Connector ={ Name = "keyType", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "key格式"} }, { Name = "IV", Type = "inputSelect", Required = false ,Label = "IV", Connector ={ Name = "ivType", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "IV格式"} }, { Name = "mode", Type = "select",DefaultValue = "CBC", Options = ["CBC", "ECB"], Required = true , Label = "Mode"}, { Name = "input", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "输入格式"}, { Name = "paddingType", Type = "select", DefaultValue = "pkcs", Options = ["pkcs", "zeroPadding"], Required = true,Label = "填充方式"} ]
func (*CodecExecFlow) DESEncrypt ¶
func (flow *CodecExecFlow) DESEncrypt(key string, keyType string, IV string, ivType string, mode string, output outputType, paddingType string) error
Tag = "加密" CodecName = "DES对称加密" Desc = """DES(Data Encryption Standard)是一种对称密钥加密算法,使用固定有效长度为56位的密钥对数据进行64位的分组加密。尽管曾广泛使用,但由于密钥太短,现已被认为不够安全。""" Params = [ { Name = "key", Type = "inputSelect", Required = true,Label = "Key", Connector ={ Name = "keyType", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "key格式"} }, { Name = "IV", Type = "inputSelect", Required = false ,Label = "IV", Connector ={ Name = "ivType", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "IV格式"} }, { Name = "mode", Type = "select",DefaultValue = "CBC", Options = ["CBC", "ECB"], Required = true , Label = "Mode"}, { Name = "output", Type = "select", DefaultValue = "hex", Options = ["hex", "raw","base64"], Required = true,Label = "输出格式"}, { Name = "paddingType", Type = "select", DefaultValue = "pkcs", Options = ["pkcs", "zeroPadding"], Required = true,Label = "填充方式"} ]
func (*CodecExecFlow) Find ¶ added in v1.3.2
func (flow *CodecExecFlow) Find(find string, findType string, Global, Multiline, IgnoreCase bool) error
Tag = "其他" CodecName = "Find" Desc = """替换字符串处理本文""" Params = [ { Name = "find", Type = "input", Required = true , Label = "Find"}, { Name = "findType", Type = "select",DefaultValue = "regexp",Options = ["regexp","raw"], Required = true , Label = "查找方式"}, { Name = "Global", Type = "checkbox", Required = true , Label = "全部匹配"}, { Name = "IgnoreCase", Type = "checkbox", Required = true , Label = "忽略大小写"}, { Name = "Multiline", Type = "checkbox", Required = true , Label = "多行匹配"}, ]
func (*CodecExecFlow) Fuzz ¶
func (flow *CodecExecFlow) Fuzz() error
Tag = "其他" CodecName = "fuzztag渲染" Desc = """渲染fuzztag"""
func (*CodecExecFlow) GB18030ToUTF8 ¶
func (flow *CodecExecFlow) GB18030ToUTF8() error
Tag = "其他" CodecName = "GB18030ToUTF8" Desc ="""GB18030是一种中文编码标准,支持简体中文、繁体中文、日文和韩文等多种字符集,是GB2312和GBK的扩展。该函数将GB18030编码的文本转换为UTF-8编码。""" Params = [ ]
func (*CodecExecFlow) HexDecode ¶
func (flow *CodecExecFlow) HexDecode() error
Tag = "解码" CodecName = "十六进制解码" Desc = """十六进制编码是一种数字表示法,使用0到9和A到F共16个字符来表示数值。在计算机科学中,它广泛用于简化二进制数据的表示,因为每4位二进制数(比特)可以用单个十六进制数精确表示。"""
func (*CodecExecFlow) HexEncode ¶
func (flow *CodecExecFlow) HexEncode() error
Tag = "编码" CodecName = "十六进制编码" Desc = """十六进制编码是一种数字表示法,使用0到9和A到F共16个字符来表示数值。在计算机科学中,它广泛用于简化二进制数据的表示,因为每4位二进制数(比特)可以用单个十六进制数精确表示。"""
func (*CodecExecFlow) Hmac ¶ added in v1.3.3
func (flow *CodecExecFlow) Hmac(key string, keyType string, hashMethod string, output outputType) error
Tag = "MAC" CodecName = "Hmac" Desc = """HMAC(Hash-based Message Authentication Code)是一种密钥相关的哈希运算消息认证码,主要用于服务器对访问者进行鉴权认证流程中。""" Params = [ { Name = "key", Type = "inputSelect", Required = true,Label = "Key", Connector ={ Name = "keyType", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "key格式"} }, { Name = "hashMethod", Type = "select",DefaultValue = "SHA-512", Options = ["SHA-1", "SHA-256","SHA-512","MD5","SM3"], Required = true ,Label = "哈希方法"}, { Name = "output", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "输出格式"} ]
func (*CodecExecFlow) HtmlDecode ¶
func (flow *CodecExecFlow) HtmlDecode() error
Tag = "解码" CodecName = "HTML解码" Desc = """HTML编码是一种将特殊字符转换为HTML实体的编码方式。"""
func (*CodecExecFlow) HtmlEncode ¶
func (flow *CodecExecFlow) HtmlEncode(entityRef string, fullEncode bool) error
Tag = "编码" CodecName = "HTML编码" Desc = """HTML编码是一种将特殊字符转换为HTML实体的编码方式。""" Params = [ { Name = "entityRef", Type = "select",DefaultValue = "named", Options = ["dec", "hex", "named"], Required = true ,Label = "实体编码格式"}, { Name = "fullEncode", Type = "checkbox", Required = true , Label = "全部编码"} ]
func (*CodecExecFlow) JavaSerialize ¶
func (flow *CodecExecFlow) JavaSerialize(output string) error
Tag = "Java" CodecName = "序列化" Desc = """Java序列化是一种将Java对象转换为字节流的机制,以便可以在网络上传输或将其保存到文件中。 """ Params = [ { Name = "output", Type = "select",DefaultValue = "raw", Options = ["raw", "hex", "base64"], Required = true , Label = "输出格式"} ]
func (*CodecExecFlow) JavaUnserialize ¶
func (flow *CodecExecFlow) JavaUnserialize(input string, output string) error
Tag = "Java" CodecName = "反序列化" Desc = """Java反序列化是一种将字节流转换为Java对象的机制,以便可以在网络上传输或将其保存到文件中。 Yak中提供了两种反序列化方式: dumper 和 object-stream ,其中object-stream是Yak独有的一种伪代码表达形式,更直观易读""" Params = [ { Name = "input", Type = "select",DefaultValue = "raw", Options = ["raw", "hex", "base64"], Required = true , Label = "输入格式"}, { Name = "output", Type = "select",DefaultValue = "dumper", Options = ["dumper", "object-stream"], Required = true , Label = "输出格式"} ]
func (*CodecExecFlow) JsonFormat ¶
func (flow *CodecExecFlow) JsonFormat(mode string) error
Tag = "数据美化" CodecName = "Json处理" Desc = """JSON(JavaScript Object Notation)是一种轻量级数据交换格式,易于人阅读和编写,同时也易于机器解析和生成。它基于JavaScript语言标准,但独立于语言,被广泛应用于网络应用程序中数据的传输。""" Params = [ { Name = "mode", Type = "select",DefaultValue = "两格缩进", Options = ["四格缩进", "两格缩进","压缩"], Required = true ,Label = "处理方式"} ]
func (*CodecExecFlow) JwtParse ¶
func (flow *CodecExecFlow) JwtParse() error
Tag = "其他" CodecName = "JWT解析" Desc = """JWT(JSON Web Token)是一种开放标准(RFC 7519),用于在网络应用间安全地传输声明信息,通常用于身份验证和信息交换。"""
func (*CodecExecFlow) JwtSign ¶
func (flow *CodecExecFlow) JwtSign(algorithm string, key []byte, isBase64 bool) error
Tag = "其他" CodecName = "JWT签名" Desc = """JWT(JSON Web Token)是一种开放标准(RFC 7519),用于在网络应用间安全地传输声明信息,通常用于身份验证和信息交换。""" Params = [ { Name = "algorithm", Type = "select",DefaultValue = "HS256",Options = ["ES384","ES256","ES512","HS256","HS384","HS512","PS256","PS384","PS512","RS256","RS384","RS512","None"], Required = true , Label = "签名算法"}, { Name = "key", Type = "input", Required = true , Label = "JWT密钥"}, { Name = "isBase64", Type = "checkbox", Required = true , Label = "base64编码"}, ]
func (*CodecExecFlow) MD5 ¶
func (flow *CodecExecFlow) MD5() error
Tag = "Hash" CodecName = "MD5" Desc = """MD5是一种广泛使用的加密哈希函数,它接受任意长度的输入并输出固定长度(128位)的哈希值。常用于验证数据完整性,但不适用于安全加密,因为存在碰撞漏洞。"""
func (*CodecExecFlow) MakePacket ¶
func (flow *CodecExecFlow) MakePacket(mode string) error
Tag = "其他" CodecName = "生成数据包" Desc = """生成HTTP数据包,支持使用cURL和URL""" Params = [ { Name = "mode", Type = "select",DefaultValue = "URL", Options = ["cURL", "URL"], Required = true ,Label = "输入格式"} ]
func (*CodecExecFlow) Packet2cURL ¶
func (flow *CodecExecFlow) Packet2cURL(https bool) error
Tag = "其他" CodecName = "数据包生成cURL命令" Desc = """通过数据包生成cURL命令,以导出数据包""" Params = [ { Name = "https", Type = "checkbox", Required = true , Label = "https"} ]
func (*CodecExecFlow) RSADecrypt ¶ added in v1.3.2
func (flow *CodecExecFlow) RSADecrypt(priKey string, decryptSchema string, algorithm string) error
Tag = "解密" CodecName = "RSA解密" Desc = """RSA加密算法是一种非对称加密算法,在公开密钥加密和电子商业中被广泛使用。RSA是被研究得最广泛的公钥算法,从提出后经历了各种攻击的考验,逐渐为人们接受,普遍认为是目前最优秀的公钥方案之一。""" Params = [ { Name = "priKey", Type = "text", Required = true,Label = "pem私钥"}, { Name = "decryptSchema", Type = "select",DefaultValue = "RSA-OAEP", Options = ["RSA-OAEP", "PKCS1v15"], Required = true, Label = "填充方式"}, { Name = "algorithm", Type = "select",DefaultValue = "SHA-256", Options = ["SHA-1", "SHA-256","SHA-384","SHA-512","MD5"], Required = true ,Label = "hash算法"} ]
func (*CodecExecFlow) RSAEncrypt ¶ added in v1.3.2
func (flow *CodecExecFlow) RSAEncrypt(pubKey string, encryptSchema string, algorithm string) error
Tag = "加密" CodecName = "RSA加密" Desc = """RSA加密算法是一种非对称加密算法,在公开密钥加密和电子商业中被广泛使用。RSA是被研究得最广泛的公钥算法,从提出后经历了各种攻击的考验,逐渐为人们接受,普遍认为是目前最优秀的公钥方案之一。""" Params = [ { Name = "pubKey", Type = "text", Required = true,Label = "pem公钥"}, { Name = "encryptSchema", Type = "select",DefaultValue = "RSA-OAEP", Options = ["RSA-OAEP", "PKCS1v15"], Required = true, Label = "填充方式"}, { Name = "algorithm", Type = "select",DefaultValue = "SHA-256", Options = ["SHA-1", "SHA-256","SHA-384","SHA-512","MD5"], Required = true ,Label = "hash算法"} ]
func (*CodecExecFlow) Replace ¶ added in v1.3.2
func (flow *CodecExecFlow) Replace(find string, replace string, findType string, Global, Multiline, IgnoreCase bool) error
Tag = "其他" CodecName = "Replace" Desc = """替换字符串处理本文""" Params = [ { Name = "find", Type = "input", Required = true , Label = "Find"}, { Name = "replace", Type = "input", Required = false , Label = "Replace"}, { Name = "findType", Type = "select",DefaultValue = "regexp",Options = ["regexp","raw"], Required = true , Label = "查找方式"}, { Name = "Global", Type = "checkbox", Required = true , Label = "全部匹配"}, { Name = "IgnoreCase", Type = "checkbox", Required = true , Label = "忽略大小写"}, { Name = "Multiline", Type = "checkbox", Required = true , Label = "多行匹配"}, ]
func (*CodecExecFlow) SHA1 ¶
func (flow *CodecExecFlow) SHA1() error
Tag = "Hash" CodecName = "SHA-1" Desc = """SHA-1(安全哈希算法1)是一种加密哈希函数,输出160位哈希值,用于确保数据完整性。虽然曾广泛应用于安全领域,但由于潜在的安全漏洞,现在不再推荐用于敏感数据保护。"""
func (*CodecExecFlow) SHA2 ¶
func (flow *CodecExecFlow) SHA2(size string) error
Tag = "Hash" CodecName = "SHA-2" Desc = """SHA-2是安全哈希算法家族的一部分,包括多个版本(如SHA-256和SHA-512),输出哈希值长度不同,用于数据完整性验证和数字签名,相较于SHA-1提供更强的安全性。""" Params = [ { Name = "size", Type = "select",DefaultValue = "SHA-512", Options = ["SHA-224", "SHA-256","SHA-384","SHA-512"], Required = true ,Label = "哈希版本"} ]
func (*CodecExecFlow) SM3 ¶
func (flow *CodecExecFlow) SM3() error
Tag = "Hash" CodecName = "SM3" Desc = """SM3是一种密码哈希函数,由中国国家密码管理局发布,输出长度为256位。它用于确保数据的完整性和一致性,与MD5和SHA-1相比,SM3设计更安全,主要应用于中国的商用密码系统中。"""
func (*CodecExecFlow) SM4Decrypt ¶
func (flow *CodecExecFlow) SM4Decrypt(key string, keyType string, IV string, ivType string, mode string, input outputType, paddingType string) error
Tag = "解密" CodecName = "SM4对称解密" Desc = """SM4是一个128位的块密码,目前被确定为中国的国家标准(GB/T 32907-2016)。支持多种块密码模式。""" Params = [ { Name = "key", Type = "inputSelect", Required = true,Label = "Key", Connector ={ Name = "keyType", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "key格式"} }, { Name = "IV", Type = "inputSelect", Required = false ,Label = "IV", Connector ={ Name = "ivType", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "IV格式"} }, { Name = "mode", Type = "select",DefaultValue = "CBC", Options = ["CBC", "ECB", "CTR", "CFB", "OFB"], Required = true, Label = "Mode"}, { Name = "input", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "输入格式"}, { Name = "paddingType", Type = "select", DefaultValue = "pkcs", Options = ["pkcs", "zeroPadding"], Required = true,Label = "填充方式"} ]
func (*CodecExecFlow) SM4Encrypt ¶
func (flow *CodecExecFlow) SM4Encrypt(key string, keyType string, IV string, ivType string, mode string, output outputType, paddingType string) error
Tag = "加密" CodecName = "SM4对称加密" Desc = """SM4是一个128位的块密码,目前被确定为中国的国家标准(GB/T 32907-2016)。支持多种块密码模式。""" Params = [ { Name = "key", Type = "inputSelect", Required = true,Label = "Key", Connector ={ Name = "keyType", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "key格式"} }, { Name = "IV", Type = "inputSelect", Required = false ,Label = "IV", Connector ={ Name = "ivType", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "IV格式"} }, { Name = "mode", Type = "select", DefaultValue = "CBC",Options = ["CBC", "ECB", "CTR", "CFB", "OFB"], Required = true, Label = "Mode"}, { Name = "output", Type = "select", DefaultValue = "hex", Options = ["hex", "raw","base64"], Required = true,Label = "输出格式"}, { Name = "paddingType", Type = "select", DefaultValue = "pkcs", Options = ["pkcs", "zeroPadding"], Required = true,Label = "填充方式"} ]
func (*CodecExecFlow) TripleDESDecrypt ¶
func (flow *CodecExecFlow) TripleDESDecrypt(key string, keyType string, IV string, ivType string, mode string, input outputType, paddingType string) error
Tag = "解密" CodecName = "TripleDES对称解密" Desc = """TripleDES(3DES)是DES的改进版,通过连续三次应用DES算法(可以使用三个不同的密钥)来增加加密的强度,提供了更高的安全性。""" Params = [ { Name = "key", Type = "inputSelect", Required = true,Label = "Key", Connector ={ Name = "keyType", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "key格式"} }, { Name = "IV", Type = "inputSelect", Required = false ,Label = "IV", Connector ={ Name = "ivType", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "IV格式"} }, { Name = "mode", Type = "select",DefaultValue = "CBC", Options = ["CBC", "ECB"], Required = true , Label = "Mode"}, { Name = "input", Type = "select",DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "输入格式"}, { Name = "paddingType", Type = "select", DefaultValue = "pkcs", Options = ["pkcs", "zeroPadding"], Required = true,Label = "填充方式"} ]
func (*CodecExecFlow) TripleDESEncrypt ¶
func (flow *CodecExecFlow) TripleDESEncrypt(key string, keyType string, IV string, ivType string, mode string, output outputType, paddingType string) error
Tag = "加密" CodecName = "TripleDES对称加密" Desc = """TripleDES(3DES)是DES的改进版,通过连续三次应用DES算法(可以使用三个不同的密钥)来增加加密的强度,提供了更高的安全性。""" Params = [ { Name = "key", Type = "inputSelect", Required = true,Label = "Key", Connector ={ Name = "keyType", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "key格式"} }, { Name = "IV", Type = "inputSelect", Required = false ,Label = "IV", Connector ={ Name = "ivType", Type = "select", DefaultValue = "hex", Options = ["hex", "raw", "base64"], Required = true ,Label = "IV格式"} }, { Name = "mode", Type = "select",DefaultValue = "CBC", Options = ["CBC", "ECB"], Required = true, Label = "Mode"}, { Name = "output", Type = "select",DefaultValue = "hex", Options = ["hex", "raw","base64"], Required = true ,Label = "输出格式"}, { Name = "paddingType", Type = "select", DefaultValue = "pkcs", Options = ["pkcs", "zeroPadding"], Required = true,Label = "填充方式"} ]
func (*CodecExecFlow) URLDecode ¶
func (flow *CodecExecFlow) URLDecode() error
Tag = "解码" CodecName = "URL解码" Desc = """URL编码,又称百分号编码,是一种互联网标准,用于将非ASCII字符、保留字符或任何可能在URL中产生歧义的字符转换为一个百分号后跟两位十六进制数的形式,以确保网络传输的无歧义性和安全性。"""
func (*CodecExecFlow) URLEncode ¶
func (flow *CodecExecFlow) URLEncode(fullEncode bool) error
Tag = "编码" CodecName = "URL编码" Desc = """URL编码,又称百分号编码,是一种互联网标准,用于将非ASCII字符、保留字符或任何可能在URL中产生歧义的字符转换为一个百分号后跟两位十六进制数的形式,以确保网络传输的无歧义性和安全性。""" Params = [ { Name = "fullEncode", Type = "checkbox", Required = true , Label = "全部编码"} ]
func (*CodecExecFlow) UTF8ToCharset ¶
func (flow *CodecExecFlow) UTF8ToCharset(charset string) error
Tag = "其他" CodecName = "UTF8字符集转换为其他字符集" Desc ="""尝试将文本从UTF-8字符集转换为指定的字符集。""" Params = [ { Name = "charset", Type = "select",DefaultValue = "gb18030",Options = ["gb18030", "windows-1252", "iso-8859-1", "big5", "utf-16"], Required = true , Label = "字符集"}, ]
func (*CodecExecFlow) UnicodeDecode ¶
func (flow *CodecExecFlow) UnicodeDecode() error
Tag = "解码" CodecName = "Unicode 中文解码" Desc = """Unicode 编解码是将世界各种文字符号映射到唯一码点,并通过编码方案(如UTF-8、UTF-16)转为字节序列的过程,以支持全球文本的统一表示和处理。"""
func (*CodecExecFlow) UnicodeEncode ¶
func (flow *CodecExecFlow) UnicodeEncode() error
Tag = "编码" CodecName = "Unicode 编码" Desc = """Unicode 编解码是将世界各种文字符号映射到唯一码点,并通过编码方案(如UTF-8、UTF-16)转为字节序列的过程,以支持全球文本的统一表示和处理。"""