# Hash128 - 脚本和图表函数

Hash128() 用于返回 128 位哈希的组合输入表达式值。结果为 22 个字符的字符串。 哈希值可用于屏蔽个人身份信息 (PII)，如客户姓名、社会保障号码或帐号。

语法：

Hash128(expr{, expression})

返回数据类型： 字符串

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunctions/Hash128.htm)

#### 示例：图表表达式

| 示例 | 结果 |
| --- | --- |
| Hash128 ( 'abc', 'xyz', '123' ) | 返回 'MA&5]6+3=:&gt;:&gt;G%S&lt;U\*S2+'。 |
| Hash128 ( Region, Year, Month )<br><br>Note: Region, Year, and Month are table fields. | 返回 'G7\*=6GKPJ(Z+)^KM?&lt;$'A+'。 |

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunctions/Hash128.htm)

#### 示例：加载脚本和结果

```
Hash_128:
Load *, 
Hash128(Region, Year, Month) as Hash128;
Load * inline [
Region, Year, Month
abc, xyz, 123
EU, 2022, 01
UK, 2022, 02
US, 2022, 02 ]; 
```

结果

| 区域 | Year | 月 | Hash128 |
| --- | --- | --- | --- |
| abc | xyz | 123 | MA&5]6+3=:&gt;;&gt;G%S&lt;U\*S2+ |
| EU | 2022 | 01 | B40^K&[T@!;VB'XR]&lt;5=/$ |
| UK | 2022 | 02 | O5T;+1?[B&"F&1//MA[MN! |
| US | 2022 | 02 | C6@#]4#\_G-(]J7EQY#KRW0 |