github.com/GuanceCloud/cliutils@v1.1.21/pipeline/ptinput/funcs/md/hash.md (about)

     1  ### `hash()` {#fn_hash}
     2  
     3  函数原型: `fn hash(text: str, method: str) -> str`
     4  
     5  函数说明: 计算文本的 hash
     6  
     7  函数参数:
     8  
     9  - `text`: 输入文本
    10  - `method`: hash 算法,允许的值包含 `md5`,`sha1`,`sha256`,`sha512`
    11  
    12  示例:
    13  
    14  ```python
    15  pt_kvs_set("md5sum", hash("abc", "sha1"))
    16  ```