github.com/GuanceCloud/cliutils@v1.1.21/pipeline/ptinput/funcs/md/b64enc.md (about) 1 ### `b64enc()` {#fn-b64enc} 2 3 函数原型:`fn b64enc(key: str)` 4 5 函数说明:对指定字段上获取的字符串数据进行 base64 编码 6 7 函数参数 8 9 - `key`: 待提取字段 10 11 示例: 12 13 ```python 14 # 待处理数据 {"str": "hello, world"} 15 json(_, `str`) 16 b64enc(`str`) 17 18 # 处理结果 19 # { 20 # "str": "aGVsbG8sIHdvcmxk" 21 # } 22 ```