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

     1  ### `hash()` {#fn_hash}
     2  
     3  Function prototype: `fn hash(text: str, method: str) -> str`
     4  
     5  Function description: Calculate the hash of the text
     6  
     7  Function parameters:
     8  
     9  - `text`: input text
    10  - `method`: Hash algorithm, allowing values including `md5`, `sha1`, `sha256`, `sha512`
    11  
    12  Example:
    13  
    14  ```python
    15  pt_kvs_set("md5sum", hash("abc", "sha1"))
    16  ```